Rename MakerSuite => AI Studio

06e3d5f8de7d8dca6fcd9d0c8eaeeed9fc421b47

Cohee <18619528+Cohee1207@users.noreply.github.com>

22 files changed, +32 -32Ignore whitespace
public/index.html+2 -2
@@ -2437,7 +2437,7 @@
24372437 <option value="claude">Claude</option>
24382438 <option value="cohere">Cohere</option>
24392439 <option value="groq">Groq</option>
24402440 <option value="makersuite">Google MakerSuiteAI Studio</option>
24412441 <option value="mistralai">MistralAI</option>
24422442 <option value="openrouter">OpenRouter</option>
24432443 <option value="perplexity">Perplexity</option>
@@ -2800,7 +2800,7 @@
28002800 </div>
28012801 </form>
28022802 <form id="makersuite_form" data-source="makersuite" action="javascript:void(null);" method="post" enctype="multipart/form-data">
28032803 <h4 data-i18n="MakerSuiteGoogle AI Studio API Key">MakerSuiteGoogle AI Studio API Key</h4>
28042804 <div class="flex-container">
28052805 <input id="api_key_makersuite" name="api_key_makersuite" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">
28062806 <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>
public/locales/ar-sa.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "طريقة بديلة",
391391 "AI21 API Key": "مفتاح API لـ AI21",
392392 "AI21 Model": "نموذج AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "مفتاح واجهة برمجة تطبيقات MakerSuiteGoogle AI Studio",
394394 "Google Model": "نموذج جوجل",
395395 "MistralAI API Key": "مفتاح واجهة برمجة التطبيقات MistralAI",
396396 "MistralAI Model": "نموذج ميسترال آي آي",
public/locales/de-de.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Alternative Methode",
391391 "AI21 API Key": "AI21 API-Schlüssel",
392392 "AI21 Model": "AI21-Modell",
393393 "MakerSuiteGoogle AI Studio API Key": "MakerSuiteGoogle AI Studio API-Schlüssel",
394394 "Google Model": "Google-Modell",
395395 "MistralAI API Key": "MistralAI API-Schlüssel",
396396 "MistralAI Model": "MistralAI-Modell",
public/locales/es-es.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Método alternativo",
391391 "AI21 API Key": "Clave API de AI21",
392392 "AI21 Model": "Modelo de AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "Clave API de MakerSuiteGoogle AI Studio",
394394 "Google Model": "Modelo de Google",
395395 "MistralAI API Key": "Clave API de MistralAI",
396396 "MistralAI Model": "Modelo MistralAI",
public/locales/fr-fr.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Méthode alternative",
391391 "AI21 API Key": "Clé API AI21",
392392 "AI21 Model": "Modèle AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "Clé API MakerSuiteGoogle AI Studio",
394394 "Google Model": "Modèle Google",
395395 "MistralAI API Key": "Clé API MistralAI",
396396 "MistralAI Model": "Modèle MistralAI",
public/locales/is-is.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Aðferð Bakmenn",
391391 "AI21 API Key": "Lykill API fyrir AI21",
392392 "AI21 Model": "AI21 Módel",
393393 "MakerSuiteGoogle AI Studio API Key": "MakerSuiteGoogle AI Studio API lykill",
394394 "Google Model": "Google líkan",
395395 "MistralAI API Key": "MistralAI API lykill",
396396 "MistralAI Model": "MistralAI líkan",
public/locales/it-it.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Metodo alternativo",
391391 "AI21 API Key": "Chiave API di AI21",
392392 "AI21 Model": "Modello AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "Chiave API MakerSuiteGoogle AI Studio",
394394 "Google Model": "Modello Google",
395395 "MistralAI API Key": "Chiave API MistralAI",
396396 "MistralAI Model": "Modello MistralAI",
public/locales/ja-jp.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "代替手法",
391391 "AI21 API Key": "AI21のAPIキー",
392392 "AI21 Model": "AI21モデル",
393393 "MakerSuiteGoogle AI Studio API Key": "MakerSuiteGoogle AI Studio APIキー",
394394 "Google Model": "Google モデル",
395395 "MistralAI API Key": "MistralAI API キー",
396396 "MistralAI Model": "MistralAI モデル",
public/locales/ko-kr.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "대체 방법",
391391 "AI21 API Key": "AI21 API 키",
392392 "AI21 Model": "AI21 모델",
393393 "MakerSuiteGoogle AI Studio API Key": "MakerSuiteGoogle AI Studio API 키",
394394 "Google Model": "구글 모델",
395395 "MistralAI API Key": "MistralAI API 키",
396396 "MistralAI Model": "MistralAI 모델",
public/locales/pt-pt.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Método Alternativo",
391391 "AI21 API Key": "Chave da API AI21",
392392 "AI21 Model": "Modelo AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "Chave API MakerSuiteGoogle AI Studio",
394394 "Google Model": "Modelo Google",
395395 "MistralAI API Key": "Chave de API MistralAI",
396396 "MistralAI Model": "Modelo MistralAI",
public/locales/ru-ru.json+1 -1
@@ -722,7 +722,7 @@
722722 "Proxy Server URL": "Адрес прокси-сервера",
723723 "MistralAI Model": "Модель MistralAI",
724724 "MistralAI API Key": "Ключ от API MistralAI",
725725 "MakerSuiteGoogle AI Studio API Key": "Ключ от API MakerSuiteGoogle AI Studio",
726726 "Google Model": "Модель Google",
727727 "Cohere API Key": "Ключ от API Cohere",
728728 "Cohere Model": "Модель Cohere",
public/locales/uk-ua.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Альтернативний метод",
391391 "AI21 API Key": "Ключ API для AI21",
392392 "AI21 Model": "Модель AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "Ключ API MakerSuiteGoogle AI Studio",
394394 "Google Model": "Модель Google",
395395 "MistralAI API Key": "Ключ API MistralAI",
396396 "MistralAI Model": "Модель MistralAI",
public/locales/vi-vn.json+1 -1
@@ -390,7 +390,7 @@
390390 "Alt Method": "Phương pháp thay thế",
391391 "AI21 API Key": "Khóa API của AI21",
392392 "AI21 Model": "Mô hình AI21",
393393 "MakerSuiteGoogle AI Studio API Key": "Khóa API MakerSuiteGoogle AI Studio",
394394 "Google Model": "Mô hình Google",
395395 "MistralAI API Key": "Khóa API MistralAI",
396396 "MistralAI Model": "Mô hình MistralAI",
public/locales/zh-cn.json+1 -1
@@ -406,7 +406,7 @@
406406 "Alt Method": "备用方法",
407407 "AI21 API Key": "AI21 API 密钥",
408408 "AI21 Model": "AI21 模型",
409409 "MakerSuiteGoogle AI Studio API Key": "MakerSuiteGoogle AI Studio API 密钥",
410410 "Google Model": "Google 模型",
411411 "MistralAI API Key": "MistralAI API 密钥",
412412 "MistralAI Model": "MistralAI 模型",
public/locales/zh-tw.json+1 -1
@@ -391,7 +391,7 @@
391391 "Alt Method": "替代方法",
392392 "AI21 API Key": "AI21 API 金鑰",
393393 "AI21 Model": "AI21 模型",
394394 "MakerSuiteGoogle AI Studio API Key": "MakerSuiteGoogle AI Studio API 金鑰",
395395 "Google Model": "Google 模型",
396396 "MistralAI API Key": "MistralAI API 金鑰",
397397 "MistralAI Model": "MistralAI 模型",
public/scripts/extensions/caption/settings.html+1 -1
@@ -20,7 +20,7 @@
2020 <option value="zerooneai">01.AI (Yi)</option>
2121 <option value="anthropic">Anthropic</option>
2222 <option value="custom" data-i18n="Custom (OpenAI-compatible)">Custom (OpenAI-compatible)</option>
2323 <option value="google">Google MakerSuiteAI Studio</option>
2424 <option value="koboldcpp">KoboldCpp</option>
2525 <option value="llamacpp">llama.cpp</option>
2626 <option value="ollama">Ollama</option>
public/scripts/extensions/shared.js+1 -1
@@ -141,7 +141,7 @@ function throwIfInvalidModel(useReverseProxy) {
141141 }
142142
143143 if (extension_settings.caption.multimodal_api === 'google' && !secret_state[SECRET_KEYS.MAKERSUITE] && !useReverseProxy) {
144144 throw new Error('MakerSuiteGoogle AI Studio API key is not set.');
145145 }
146146
147147 if (extension_settings.caption.multimodal_api === 'ollama' && !textgenerationwebui_settings.server_urls[textgen_types.OLLAMA]) {
public/scripts/extensions/vectors/settings.html+1 -1
@@ -12,7 +12,7 @@
1212 <select id="vectors_source" class="text_pole">
1313 <option value="cohere">Cohere</option>
1414 <option value="extras">Extras</option>
1515 <option value="palm">Google MakerSuiteAI Studio</option>
1616 <option value="llamacpp">llama.cpp</option>
1717 <option value="transformers" data-i18n="Local (Transformers)">Local (Transformers)</option>
1818 <option value="mistral">MistralAI</option>
public/scripts/openai.js+1 -1
@@ -4473,7 +4473,7 @@ async function onConnectButtonClick(e) {
44734473 }
44744474
44754475 if (!secret_state[SECRET_KEYS.MAKERSUITE] && !oai_settings.reverse_proxy) {
44764476 console.log('No secret key saved for MakerSuiteGoogle AI Studio');
44774477 return;
44784478 }
44794479 }
src/endpoints/backends/chat-completions.js+7 -7
@@ -259,7 +259,7 @@ async function sendMakerSuiteRequest(request, response) {
259259 const apiKey = request.body.reverse_proxy ? request.body.proxy_password : readSecret(request.user.directories, SECRET_KEYS.MAKERSUITE);
260260
261261 if (!request.body.reverse_proxy && !apiKey) {
262262 console.log('MakerSuiteGoogle AI Studio API key is missing.');
263263 return response.status(400).send({ error: true });
264264 }
265265
@@ -326,7 +326,7 @@ async function sendMakerSuiteRequest(request, response) {
326326 }
327327
328328 const body = isGemini ? getGeminiBody() : getBisonBody();
329329 console.log('MakerSuiteGoogle AI Studio request:', body);
330330
331331 try {
332332 const controller = new AbortController();
@@ -362,7 +362,7 @@ async function sendMakerSuiteRequest(request, response) {
362362 }
363363 } else {
364364 if (!generateResponse.ok) {
365365 console.log(`MakerSuiteGoogle AI Studio API returned error: ${generateResponse.status} ${generateResponse.statusText} ${await generateResponse.text()}`);
366366 return response.status(generateResponse.status).send({ error: true });
367367 }
368368
@@ -370,7 +370,7 @@ async function sendMakerSuiteRequest(request, response) {
370370
371371 const candidates = generateResponseJson?.candidates;
372372 if (!candidates || candidates.length === 0) {
373373 let message = 'MakerSuiteGoogle AI Studio API returned no candidate';
374374 console.log(message, generateResponseJson);
375375 if (generateResponseJson?.promptFeedback?.blockReason) {
376376 message += `\nPrompt was blocked due to : ${generateResponseJson.promptFeedback.blockReason}`;
@@ -381,19 +381,19 @@ async function sendMakerSuiteRequest(request, response) {
381381 const responseContent = candidates[0].content ?? candidates[0].output;
382382 const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.[0]?.text;
383383 if (!responseText) {
384384 let message = 'MakerSuiteGoogle AI Studio Candidate text empty';
385385 console.log(message, generateResponseJson);
386386 return response.send({ error: { message } });
387387 }
388388
389389 console.log('MakerSuiteGoogle AI Studio response:', responseText);
390390
391391 // Wrap it back to OAI format
392392 const reply = { choices: [{ 'message': { 'content': responseText } }] };
393393 return response.send(reply);
394394 }
395395 } catch (error) {
396396 console.log('Error communicating with MakerSuiteGoogle AI Studio API: ', error);
397397 if (!response.headersSent) {
398398 return response.status(500).send({ error: true });
399399 }
src/endpoints/google.js+1 -1
@@ -44,7 +44,7 @@ router.post('/caption-image', jsonParser, async (request, response) => {
4444
4545 if (!result.ok) {
4646 const error = await result.json();
4747 console.log(`MakerSuiteGoogle AI Studio API returned error: ${result.status} ${result.statusText}`, error);
4848 return response.status(result.status).send({ error: true });
4949 }
5050
src/vectors/makersuite-vectors.js+4 -4
@@ -23,8 +23,8 @@ async function getMakerSuiteVector(text, directories) {
2323 const key = readSecret(directories, SECRET_KEYS.MAKERSUITE);
2424
2525 if (!key) {
2626 console.log('No MakerSuiteGoogle AI Studio key found');
2727 throw new Error('No MakerSuiteGoogle AI Studio key found');
2828 }
2929
3030 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) {
3939
4040 if (!response.ok) {
4141 const text = await response.text();
4242 console.log('MakerSuiteGoogle AI Studio request failed', response.statusText, text);
4343 throw new Error('MakerSuiteGoogle AI Studio request failed');
4444 }
4545
4646 const data = await response.json();