Rename MakerSuite => AI Studio
| @@ -2437,7 +2437,7 @@ | |||
| 2437 | <option value="claude">Claude</option> | 2437 | <option value="claude">Claude</option> |
| 2438 | <option value="cohere">Cohere</option> | 2438 | <option value="cohere">Cohere</option> |
| 2439 | <option value="groq">Groq</option> | 2439 | <option value="groq">Groq</option> |
| 2440 | <option value="makersuite">Google MakerSuite</option> | 2440 | <option value="makersuite">Google AI Studio</option> |
| 2441 | <option value="mistralai">MistralAI</option> | 2441 | <option value="mistralai">MistralAI</option> |
| 2442 | <option value="openrouter">OpenRouter</option> | 2442 | <option value="openrouter">OpenRouter</option> |
| 2443 | <option value="perplexity">Perplexity</option> | 2443 | <option value="perplexity">Perplexity</option> |
| @@ -2800,7 +2800,7 @@ | |||
| 2800 | </div> | 2800 | </div> |
| 2801 | </form> | 2801 | </form> |
| 2802 | <form id="makersuite_form" data-source="makersuite" action="javascript:void(null);" method="post" enctype="multipart/form-data"> | 2802 | <form id="makersuite_form" data-source="makersuite" action="javascript:void(null);" method="post" enctype="multipart/form-data"> |
| 2803 | <h4 data-i18n="MakerSuite API Key">MakerSuite API Key</h4> | 2803 | <h4 data-i18n="Google AI Studio API Key">Google AI Studio API Key</h4> |
| 2804 | <div class="flex-container"> | 2804 | <div class="flex-container"> |
| 2805 | <input id="api_key_makersuite" name="api_key_makersuite" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off"> | 2805 | <input id="api_key_makersuite" name="api_key_makersuite" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off"> |
| 2806 | <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_makersuite"></div> | 2806 | <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_makersuite"></div> |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "طريقة بديلة", | 390 | "Alt Method": "طريقة بديلة", |
| 391 | "AI21 API Key": "مفتاح API لـ AI21", | 391 | "AI21 API Key": "مفتاح API لـ AI21", |
| 392 | "AI21 Model": "نموذج AI21", | 392 | "AI21 Model": "نموذج AI21", |
| 393 | "MakerSuite API Key": "مفتاح واجهة برمجة تطبيقات MakerSuite", | 393 | "Google AI Studio API Key": "مفتاح واجهة برمجة تطبيقات Google AI Studio", |
| 394 | "Google Model": "نموذج جوجل", | 394 | "Google Model": "نموذج جوجل", |
| 395 | "MistralAI API Key": "مفتاح واجهة برمجة التطبيقات MistralAI", | 395 | "MistralAI API Key": "مفتاح واجهة برمجة التطبيقات MistralAI", |
| 396 | "MistralAI Model": "نموذج ميسترال آي آي", | 396 | "MistralAI Model": "نموذج ميسترال آي آي", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Alternative Methode", | 390 | "Alt Method": "Alternative Methode", |
| 391 | "AI21 API Key": "AI21 API-Schlüssel", | 391 | "AI21 API Key": "AI21 API-Schlüssel", |
| 392 | "AI21 Model": "AI21-Modell", | 392 | "AI21 Model": "AI21-Modell", |
| 393 | "MakerSuite API Key": "MakerSuite API-Schlüssel", | 393 | "Google AI Studio API Key": "Google AI Studio API-Schlüssel", |
| 394 | "Google Model": "Google-Modell", | 394 | "Google Model": "Google-Modell", |
| 395 | "MistralAI API Key": "MistralAI API-Schlüssel", | 395 | "MistralAI API Key": "MistralAI API-Schlüssel", |
| 396 | "MistralAI Model": "MistralAI-Modell", | 396 | "MistralAI Model": "MistralAI-Modell", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Método alternativo", | 390 | "Alt Method": "Método alternativo", |
| 391 | "AI21 API Key": "Clave API de AI21", | 391 | "AI21 API Key": "Clave API de AI21", |
| 392 | "AI21 Model": "Modelo de AI21", | 392 | "AI21 Model": "Modelo de AI21", |
| 393 | "MakerSuite API Key": "Clave API de MakerSuite", | 393 | "Google AI Studio API Key": "Clave API de Google AI Studio", |
| 394 | "Google Model": "Modelo de Google", | 394 | "Google Model": "Modelo de Google", |
| 395 | "MistralAI API Key": "Clave API de MistralAI", | 395 | "MistralAI API Key": "Clave API de MistralAI", |
| 396 | "MistralAI Model": "Modelo MistralAI", | 396 | "MistralAI Model": "Modelo MistralAI", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Méthode alternative", | 390 | "Alt Method": "Méthode alternative", |
| 391 | "AI21 API Key": "Clé API AI21", | 391 | "AI21 API Key": "Clé API AI21", |
| 392 | "AI21 Model": "Modèle AI21", | 392 | "AI21 Model": "Modèle AI21", |
| 393 | "MakerSuite API Key": "Clé API MakerSuite", | 393 | "Google AI Studio API Key": "Clé API Google AI Studio", |
| 394 | "Google Model": "Modèle Google", | 394 | "Google Model": "Modèle Google", |
| 395 | "MistralAI API Key": "Clé API MistralAI", | 395 | "MistralAI API Key": "Clé API MistralAI", |
| 396 | "MistralAI Model": "Modèle MistralAI", | 396 | "MistralAI Model": "Modèle MistralAI", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Aðferð Bakmenn", | 390 | "Alt Method": "Aðferð Bakmenn", |
| 391 | "AI21 API Key": "Lykill API fyrir AI21", | 391 | "AI21 API Key": "Lykill API fyrir AI21", |
| 392 | "AI21 Model": "AI21 Módel", | 392 | "AI21 Model": "AI21 Módel", |
| 393 | "MakerSuite API Key": "MakerSuite API lykill", | 393 | "Google AI Studio API Key": "Google AI Studio API lykill", |
| 394 | "Google Model": "Google líkan", | 394 | "Google Model": "Google líkan", |
| 395 | "MistralAI API Key": "MistralAI API lykill", | 395 | "MistralAI API Key": "MistralAI API lykill", |
| 396 | "MistralAI Model": "MistralAI líkan", | 396 | "MistralAI Model": "MistralAI líkan", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Metodo alternativo", | 390 | "Alt Method": "Metodo alternativo", |
| 391 | "AI21 API Key": "Chiave API di AI21", | 391 | "AI21 API Key": "Chiave API di AI21", |
| 392 | "AI21 Model": "Modello AI21", | 392 | "AI21 Model": "Modello AI21", |
| 393 | "MakerSuite API Key": "Chiave API MakerSuite", | 393 | "Google AI Studio API Key": "Chiave API Google AI Studio", |
| 394 | "Google Model": "Modello Google", | 394 | "Google Model": "Modello Google", |
| 395 | "MistralAI API Key": "Chiave API MistralAI", | 395 | "MistralAI API Key": "Chiave API MistralAI", |
| 396 | "MistralAI Model": "Modello MistralAI", | 396 | "MistralAI Model": "Modello MistralAI", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "代替手法", | 390 | "Alt Method": "代替手法", |
| 391 | "AI21 API Key": "AI21のAPIキー", | 391 | "AI21 API Key": "AI21のAPIキー", |
| 392 | "AI21 Model": "AI21モデル", | 392 | "AI21 Model": "AI21モデル", |
| 393 | "MakerSuite API Key": "MakerSuite APIキー", | 393 | "Google AI Studio API Key": "Google AI Studio APIキー", |
| 394 | "Google Model": "Google モデル", | 394 | "Google Model": "Google モデル", |
| 395 | "MistralAI API Key": "MistralAI API キー", | 395 | "MistralAI API Key": "MistralAI API キー", |
| 396 | "MistralAI Model": "MistralAI モデル", | 396 | "MistralAI Model": "MistralAI モデル", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "대체 방법", | 390 | "Alt Method": "대체 방법", |
| 391 | "AI21 API Key": "AI21 API 키", | 391 | "AI21 API Key": "AI21 API 키", |
| 392 | "AI21 Model": "AI21 모델", | 392 | "AI21 Model": "AI21 모델", |
| 393 | "MakerSuite API Key": "MakerSuite API 키", | 393 | "Google AI Studio API Key": "Google AI Studio API 키", |
| 394 | "Google Model": "구글 모델", | 394 | "Google Model": "구글 모델", |
| 395 | "MistralAI API Key": "MistralAI API 키", | 395 | "MistralAI API Key": "MistralAI API 키", |
| 396 | "MistralAI Model": "MistralAI 모델", | 396 | "MistralAI Model": "MistralAI 모델", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Método Alternativo", | 390 | "Alt Method": "Método Alternativo", |
| 391 | "AI21 API Key": "Chave da API AI21", | 391 | "AI21 API Key": "Chave da API AI21", |
| 392 | "AI21 Model": "Modelo AI21", | 392 | "AI21 Model": "Modelo AI21", |
| 393 | "MakerSuite API Key": "Chave API MakerSuite", | 393 | "Google AI Studio API Key": "Chave API Google AI Studio", |
| 394 | "Google Model": "Modelo Google", | 394 | "Google Model": "Modelo Google", |
| 395 | "MistralAI API Key": "Chave de API MistralAI", | 395 | "MistralAI API Key": "Chave de API MistralAI", |
| 396 | "MistralAI Model": "Modelo MistralAI", | 396 | "MistralAI Model": "Modelo MistralAI", |
| @@ -722,7 +722,7 @@ | |||
| 722 | "Proxy Server URL": "Адрес прокси-сервера", | 722 | "Proxy Server URL": "Адрес прокси-сервера", |
| 723 | "MistralAI Model": "Модель MistralAI", | 723 | "MistralAI Model": "Модель MistralAI", |
| 724 | "MistralAI API Key": "Ключ от API MistralAI", | 724 | "MistralAI API Key": "Ключ от API MistralAI", |
| 725 | "MakerSuite API Key": "Ключ от API MakerSuite", | 725 | "Google AI Studio API Key": "Ключ от API Google AI Studio", |
| 726 | "Google Model": "Модель Google", | 726 | "Google Model": "Модель Google", |
| 727 | "Cohere API Key": "Ключ от API Cohere", | 727 | "Cohere API Key": "Ключ от API Cohere", |
| 728 | "Cohere Model": "Модель Cohere", | 728 | "Cohere Model": "Модель Cohere", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Альтернативний метод", | 390 | "Alt Method": "Альтернативний метод", |
| 391 | "AI21 API Key": "Ключ API для AI21", | 391 | "AI21 API Key": "Ключ API для AI21", |
| 392 | "AI21 Model": "Модель AI21", | 392 | "AI21 Model": "Модель AI21", |
| 393 | "MakerSuite API Key": "Ключ API MakerSuite", | 393 | "Google AI Studio API Key": "Ключ API Google AI Studio", |
| 394 | "Google Model": "Модель Google", | 394 | "Google Model": "Модель Google", |
| 395 | "MistralAI API Key": "Ключ API MistralAI", | 395 | "MistralAI API Key": "Ключ API MistralAI", |
| 396 | "MistralAI Model": "Модель MistralAI", | 396 | "MistralAI Model": "Модель MistralAI", |
| @@ -390,7 +390,7 @@ | |||
| 390 | "Alt Method": "Phương pháp thay thế", | 390 | "Alt Method": "Phương pháp thay thế", |
| 391 | "AI21 API Key": "Khóa API của AI21", | 391 | "AI21 API Key": "Khóa API của AI21", |
| 392 | "AI21 Model": "Mô hình AI21", | 392 | "AI21 Model": "Mô hình AI21", |
| 393 | "MakerSuite API Key": "Khóa API MakerSuite", | 393 | "Google AI Studio API Key": "Khóa API Google AI Studio", |
| 394 | "Google Model": "Mô hình Google", | 394 | "Google Model": "Mô hình Google", |
| 395 | "MistralAI API Key": "Khóa API MistralAI", | 395 | "MistralAI API Key": "Khóa API MistralAI", |
| 396 | "MistralAI Model": "Mô hình MistralAI", | 396 | "MistralAI Model": "Mô hình MistralAI", |
| @@ -406,7 +406,7 @@ | |||
| 406 | "Alt Method": "备用方法", | 406 | "Alt Method": "备用方法", |
| 407 | "AI21 API Key": "AI21 API 密钥", | 407 | "AI21 API Key": "AI21 API 密钥", |
| 408 | "AI21 Model": "AI21 模型", | 408 | "AI21 Model": "AI21 模型", |
| 409 | "MakerSuite API Key": "MakerSuite API 密钥", | 409 | "Google AI Studio API Key": "Google AI Studio API 密钥", |
| 410 | "Google Model": "Google 模型", | 410 | "Google Model": "Google 模型", |
| 411 | "MistralAI API Key": "MistralAI API 密钥", | 411 | "MistralAI API Key": "MistralAI API 密钥", |
| 412 | "MistralAI Model": "MistralAI 模型", | 412 | "MistralAI Model": "MistralAI 模型", |
| @@ -391,7 +391,7 @@ | |||
| 391 | "Alt Method": "替代方法", | 391 | "Alt Method": "替代方法", |
| 392 | "AI21 API Key": "AI21 API 金鑰", | 392 | "AI21 API Key": "AI21 API 金鑰", |
| 393 | "AI21 Model": "AI21 模型", | 393 | "AI21 Model": "AI21 模型", |
| 394 | "MakerSuite API Key": "MakerSuite API 金鑰", | 394 | "Google AI Studio API Key": "Google AI Studio API 金鑰", |
| 395 | "Google Model": "Google 模型", | 395 | "Google Model": "Google 模型", |
| 396 | "MistralAI API Key": "MistralAI API 金鑰", | 396 | "MistralAI API Key": "MistralAI API 金鑰", |
| 397 | "MistralAI Model": "MistralAI 模型", | 397 | "MistralAI Model": "MistralAI 模型", |
| @@ -20,7 +20,7 @@ | |||
| 20 | <option value="zerooneai">01.AI (Yi)</option> | 20 | <option value="zerooneai">01.AI (Yi)</option> |
| 21 | <option value="anthropic">Anthropic</option> | 21 | <option value="anthropic">Anthropic</option> |
| 22 | <option value="custom" data-i18n="Custom (OpenAI-compatible)">Custom (OpenAI-compatible)</option> | 22 | <option value="custom" data-i18n="Custom (OpenAI-compatible)">Custom (OpenAI-compatible)</option> |
| 23 | <option value="google">Google MakerSuite</option> | 23 | <option value="google">Google AI Studio</option> |
| 24 | <option value="koboldcpp">KoboldCpp</option> | 24 | <option value="koboldcpp">KoboldCpp</option> |
| 25 | <option value="llamacpp">llama.cpp</option> | 25 | <option value="llamacpp">llama.cpp</option> |
| 26 | <option value="ollama">Ollama</option> | 26 | <option value="ollama">Ollama</option> |
| @@ -141,7 +141,7 @@ function throwIfInvalidModel(useReverseProxy) { | |||
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | if (extension_settings.caption.multimodal_api === 'google' && !secret_state[SECRET_KEYS.MAKERSUITE] && !useReverseProxy) { | 143 | if (extension_settings.caption.multimodal_api === 'google' && !secret_state[SECRET_KEYS.MAKERSUITE] && !useReverseProxy) { |
| 144 | throw new Error('MakerSuite API key is not set.'); | 144 | throw new Error('Google AI Studio API key is not set.'); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | if (extension_settings.caption.multimodal_api === 'ollama' && !textgenerationwebui_settings.server_urls[textgen_types.OLLAMA]) { | 147 | if (extension_settings.caption.multimodal_api === 'ollama' && !textgenerationwebui_settings.server_urls[textgen_types.OLLAMA]) { |
| @@ -12,7 +12,7 @@ | |||
| 12 | <select id="vectors_source" class="text_pole"> | 12 | <select id="vectors_source" class="text_pole"> |
| 13 | <option value="cohere">Cohere</option> | 13 | <option value="cohere">Cohere</option> |
| 14 | <option value="extras">Extras</option> | 14 | <option value="extras">Extras</option> |
| 15 | <option value="palm">Google MakerSuite</option> | 15 | <option value="palm">Google AI Studio</option> |
| 16 | <option value="llamacpp">llama.cpp</option> | 16 | <option value="llamacpp">llama.cpp</option> |
| 17 | <option value="transformers" data-i18n="Local (Transformers)">Local (Transformers)</option> | 17 | <option value="transformers" data-i18n="Local (Transformers)">Local (Transformers)</option> |
| 18 | <option value="mistral">MistralAI</option> | 18 | <option value="mistral">MistralAI</option> |
| @@ -4473,7 +4473,7 @@ async function onConnectButtonClick(e) { | |||
| 4473 | } | 4473 | } |
| 4474 | 4474 | ||
| 4475 | if (!secret_state[SECRET_KEYS.MAKERSUITE] && !oai_settings.reverse_proxy) { | 4475 | if (!secret_state[SECRET_KEYS.MAKERSUITE] && !oai_settings.reverse_proxy) { |
| 4476 | console.log('No secret key saved for MakerSuite'); | 4476 | console.log('No secret key saved for Google AI Studio'); |
| 4477 | return; | 4477 | return; |
| 4478 | } | 4478 | } |
| 4479 | } | 4479 | } |
| @@ -259,7 +259,7 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 259 | const apiKey = request.body.reverse_proxy ? request.body.proxy_password : readSecret(request.user.directories, SECRET_KEYS.MAKERSUITE); | 259 | const apiKey = request.body.reverse_proxy ? request.body.proxy_password : readSecret(request.user.directories, SECRET_KEYS.MAKERSUITE); |
| 260 | 260 | ||
| 261 | if (!request.body.reverse_proxy && !apiKey) { | 261 | if (!request.body.reverse_proxy && !apiKey) { |
| 262 | console.log('MakerSuite API key is missing.'); | 262 | console.log('Google AI Studio API key is missing.'); |
| 263 | return response.status(400).send({ error: true }); | 263 | return response.status(400).send({ error: true }); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| @@ -326,7 +326,7 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | const body = isGemini ? getGeminiBody() : getBisonBody(); | 328 | const body = isGemini ? getGeminiBody() : getBisonBody(); |
| 329 | console.log('MakerSuite request:', body); | 329 | console.log('Google AI Studio request:', body); |
| 330 | 330 | ||
| 331 | try { | 331 | try { |
| 332 | const controller = new AbortController(); | 332 | const controller = new AbortController(); |
| @@ -362,7 +362,7 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 362 | } | 362 | } |
| 363 | } else { | 363 | } else { |
| 364 | if (!generateResponse.ok) { | 364 | if (!generateResponse.ok) { |
| 365 | console.log(`MakerSuite API returned error: ${generateResponse.status} ${generateResponse.statusText} ${await generateResponse.text()}`); | 365 | console.log(`Google AI Studio API returned error: ${generateResponse.status} ${generateResponse.statusText} ${await generateResponse.text()}`); |
| 366 | return response.status(generateResponse.status).send({ error: true }); | 366 | return response.status(generateResponse.status).send({ error: true }); |
| 367 | } | 367 | } |
| 368 | 368 | ||
| @@ -370,7 +370,7 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 370 | 370 | ||
| 371 | const candidates = generateResponseJson?.candidates; | 371 | const candidates = generateResponseJson?.candidates; |
| 372 | if (!candidates || candidates.length === 0) { | 372 | if (!candidates || candidates.length === 0) { |
| 373 | let message = 'MakerSuite API returned no candidate'; | 373 | let message = 'Google AI Studio API returned no candidate'; |
| 374 | console.log(message, generateResponseJson); | 374 | console.log(message, generateResponseJson); |
| 375 | if (generateResponseJson?.promptFeedback?.blockReason) { | 375 | if (generateResponseJson?.promptFeedback?.blockReason) { |
| 376 | message += `\nPrompt was blocked due to : ${generateResponseJson.promptFeedback.blockReason}`; | 376 | message += `\nPrompt was blocked due to : ${generateResponseJson.promptFeedback.blockReason}`; |
| @@ -381,19 +381,19 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 381 | const responseContent = candidates[0].content ?? candidates[0].output; | 381 | const responseContent = candidates[0].content ?? candidates[0].output; |
| 382 | const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.[0]?.text; | 382 | const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.[0]?.text; |
| 383 | if (!responseText) { | 383 | if (!responseText) { |
| 384 | let message = 'MakerSuite Candidate text empty'; | 384 | let message = 'Google AI Studio Candidate text empty'; |
| 385 | console.log(message, generateResponseJson); | 385 | console.log(message, generateResponseJson); |
| 386 | return response.send({ error: { message } }); | 386 | return response.send({ error: { message } }); |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | console.log('MakerSuite response:', responseText); | 389 | console.log('Google AI Studio response:', responseText); |
| 390 | 390 | ||
| 391 | // Wrap it back to OAI format | 391 | // Wrap it back to OAI format |
| 392 | const reply = { choices: [{ 'message': { 'content': responseText } }] }; | 392 | const reply = { choices: [{ 'message': { 'content': responseText } }] }; |
| 393 | return response.send(reply); | 393 | return response.send(reply); |
| 394 | } | 394 | } |
| 395 | } catch (error) { | 395 | } catch (error) { |
| 396 | console.log('Error communicating with MakerSuite API: ', error); | 396 | console.log('Error communicating with Google AI Studio API: ', error); |
| 397 | if (!response.headersSent) { | 397 | if (!response.headersSent) { |
| 398 | return response.status(500).send({ error: true }); | 398 | return response.status(500).send({ error: true }); |
| 399 | } | 399 | } |
| @@ -44,7 +44,7 @@ router.post('/caption-image', jsonParser, async (request, response) => { | |||
| 44 | 44 | ||
| 45 | if (!result.ok) { | 45 | if (!result.ok) { |
| 46 | const error = await result.json(); | 46 | const error = await result.json(); |
| 47 | console.log(`MakerSuite API returned error: ${result.status} ${result.statusText}`, error); | 47 | console.log(`Google AI Studio API returned error: ${result.status} ${result.statusText}`, error); |
| 48 | return response.status(result.status).send({ error: true }); | 48 | return response.status(result.status).send({ error: true }); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| @@ -23,8 +23,8 @@ async function getMakerSuiteVector(text, directories) { | |||
| 23 | const key = readSecret(directories, SECRET_KEYS.MAKERSUITE); | 23 | const key = readSecret(directories, SECRET_KEYS.MAKERSUITE); |
| 24 | 24 | ||
| 25 | if (!key) { | 25 | if (!key) { |
| 26 | console.log('No MakerSuite key found'); | 26 | console.log('No Google AI Studio key found'); |
| 27 | throw new Error('No MakerSuite key found'); | 27 | throw new Error('No Google AI Studio key found'); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/embedding-gecko-001:embedText?key=${key}`, { | 30 | const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/embedding-gecko-001:embedText?key=${key}`, { |
| @@ -39,8 +39,8 @@ async function getMakerSuiteVector(text, directories) { | |||
| 39 | 39 | ||
| 40 | if (!response.ok) { | 40 | if (!response.ok) { |
| 41 | const text = await response.text(); | 41 | const text = await response.text(); |
| 42 | console.log('MakerSuite request failed', response.statusText, text); | 42 | console.log('Google AI Studio request failed', response.statusText, text); |
| 43 | throw new Error('MakerSuite request failed'); | 43 | throw new Error('Google AI Studio request failed'); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | const data = await response.json(); | 46 | const data = await response.json(); |