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