MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getGeminiClient

Function getGeminiClient

outdated/gemini/gemini.ts:895–903  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

893}
894
895async function getGeminiClient(): Promise<GeminiClient> {
896 const apiKey = getConfig(CONFIG_KEYS.GEMINI_API_KEY);
897 if (!apiKey) {
898 throw new Error("未设置 Gemini API 密钥。请使用 gemini apikey <密钥> 命令设置。");
899 }
900
901 const baseUrl = getConfig(CONFIG_KEYS.GEMINI_BASE_URL) || null;
902 return new GeminiClient(apiKey, baseUrl);
903}
904
905async function callGeminiChat(
906 prompt: string,

Callers 5

callGeminiChatFunction · 0.85
handleImageFunction · 0.85
processAudioGenerationFunction · 0.85
handleQuestionWithAudioFunction · 0.85
handleModelListFunction · 0.85

Calls 1

getConfigFunction · 0.70

Tested by

no test coverage detected