mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 12:47:35 +01:00
Rename MakerSuite => AI Studio
This commit is contained in:
parent
86ec1fdd40
commit
06e3d5f8de
@ -2437,7 +2437,7 @@
|
||||
<option value="claude">Claude</option>
|
||||
<option value="cohere">Cohere</option>
|
||||
<option value="groq">Groq</option>
|
||||
<option value="makersuite">Google MakerSuite</option>
|
||||
<option value="makersuite">Google AI Studio</option>
|
||||
<option value="mistralai">MistralAI</option>
|
||||
<option value="openrouter">OpenRouter</option>
|
||||
<option value="perplexity">Perplexity</option>
|
||||
@ -2800,7 +2800,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<form id="makersuite_form" data-source="makersuite" action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
||||
<h4 data-i18n="MakerSuite API Key">MakerSuite API Key</h4>
|
||||
<h4 data-i18n="Google AI Studio API Key">Google AI Studio API Key</h4>
|
||||
<div class="flex-container">
|
||||
<input id="api_key_makersuite" name="api_key_makersuite" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">
|
||||
<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 @@
|
||||
"Alt Method": "طريقة بديلة",
|
||||
"AI21 API Key": "مفتاح API لـ AI21",
|
||||
"AI21 Model": "نموذج AI21",
|
||||
"MakerSuite API Key": "مفتاح واجهة برمجة تطبيقات MakerSuite",
|
||||
"Google AI Studio API Key": "مفتاح واجهة برمجة تطبيقات Google AI Studio",
|
||||
"Google Model": "نموذج جوجل",
|
||||
"MistralAI API Key": "مفتاح واجهة برمجة التطبيقات MistralAI",
|
||||
"MistralAI Model": "نموذج ميسترال آي آي",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Alternative Methode",
|
||||
"AI21 API Key": "AI21 API-Schlüssel",
|
||||
"AI21 Model": "AI21-Modell",
|
||||
"MakerSuite API Key": "MakerSuite API-Schlüssel",
|
||||
"Google AI Studio API Key": "Google AI Studio API-Schlüssel",
|
||||
"Google Model": "Google-Modell",
|
||||
"MistralAI API Key": "MistralAI API-Schlüssel",
|
||||
"MistralAI Model": "MistralAI-Modell",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Método alternativo",
|
||||
"AI21 API Key": "Clave API de AI21",
|
||||
"AI21 Model": "Modelo de AI21",
|
||||
"MakerSuite API Key": "Clave API de MakerSuite",
|
||||
"Google AI Studio API Key": "Clave API de Google AI Studio",
|
||||
"Google Model": "Modelo de Google",
|
||||
"MistralAI API Key": "Clave API de MistralAI",
|
||||
"MistralAI Model": "Modelo MistralAI",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Méthode alternative",
|
||||
"AI21 API Key": "Clé API AI21",
|
||||
"AI21 Model": "Modèle AI21",
|
||||
"MakerSuite API Key": "Clé API MakerSuite",
|
||||
"Google AI Studio API Key": "Clé API Google AI Studio",
|
||||
"Google Model": "Modèle Google",
|
||||
"MistralAI API Key": "Clé API MistralAI",
|
||||
"MistralAI Model": "Modèle MistralAI",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Aðferð Bakmenn",
|
||||
"AI21 API Key": "Lykill API fyrir AI21",
|
||||
"AI21 Model": "AI21 Módel",
|
||||
"MakerSuite API Key": "MakerSuite API lykill",
|
||||
"Google AI Studio API Key": "Google AI Studio API lykill",
|
||||
"Google Model": "Google líkan",
|
||||
"MistralAI API Key": "MistralAI API lykill",
|
||||
"MistralAI Model": "MistralAI líkan",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Metodo alternativo",
|
||||
"AI21 API Key": "Chiave API di AI21",
|
||||
"AI21 Model": "Modello AI21",
|
||||
"MakerSuite API Key": "Chiave API MakerSuite",
|
||||
"Google AI Studio API Key": "Chiave API Google AI Studio",
|
||||
"Google Model": "Modello Google",
|
||||
"MistralAI API Key": "Chiave API MistralAI",
|
||||
"MistralAI Model": "Modello MistralAI",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "代替手法",
|
||||
"AI21 API Key": "AI21のAPIキー",
|
||||
"AI21 Model": "AI21モデル",
|
||||
"MakerSuite API Key": "MakerSuite APIキー",
|
||||
"Google AI Studio API Key": "Google AI Studio APIキー",
|
||||
"Google Model": "Google モデル",
|
||||
"MistralAI API Key": "MistralAI API キー",
|
||||
"MistralAI Model": "MistralAI モデル",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "대체 방법",
|
||||
"AI21 API Key": "AI21 API 키",
|
||||
"AI21 Model": "AI21 모델",
|
||||
"MakerSuite API Key": "MakerSuite API 키",
|
||||
"Google AI Studio API Key": "Google AI Studio API 키",
|
||||
"Google Model": "구글 모델",
|
||||
"MistralAI API Key": "MistralAI API 키",
|
||||
"MistralAI Model": "MistralAI 모델",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Método Alternativo",
|
||||
"AI21 API Key": "Chave da API AI21",
|
||||
"AI21 Model": "Modelo AI21",
|
||||
"MakerSuite API Key": "Chave API MakerSuite",
|
||||
"Google AI Studio API Key": "Chave API Google AI Studio",
|
||||
"Google Model": "Modelo Google",
|
||||
"MistralAI API Key": "Chave de API MistralAI",
|
||||
"MistralAI Model": "Modelo MistralAI",
|
||||
|
@ -722,7 +722,7 @@
|
||||
"Proxy Server URL": "Адрес прокси-сервера",
|
||||
"MistralAI Model": "Модель MistralAI",
|
||||
"MistralAI API Key": "Ключ от API MistralAI",
|
||||
"MakerSuite API Key": "Ключ от API MakerSuite",
|
||||
"Google AI Studio API Key": "Ключ от API Google AI Studio",
|
||||
"Google Model": "Модель Google",
|
||||
"Cohere API Key": "Ключ от API Cohere",
|
||||
"Cohere Model": "Модель Cohere",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Альтернативний метод",
|
||||
"AI21 API Key": "Ключ API для AI21",
|
||||
"AI21 Model": "Модель AI21",
|
||||
"MakerSuite API Key": "Ключ API MakerSuite",
|
||||
"Google AI Studio API Key": "Ключ API Google AI Studio",
|
||||
"Google Model": "Модель Google",
|
||||
"MistralAI API Key": "Ключ API MistralAI",
|
||||
"MistralAI Model": "Модель MistralAI",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"Alt Method": "Phương pháp thay thế",
|
||||
"AI21 API Key": "Khóa API của AI21",
|
||||
"AI21 Model": "Mô hình AI21",
|
||||
"MakerSuite API Key": "Khóa API MakerSuite",
|
||||
"Google AI Studio API Key": "Khóa API Google AI Studio",
|
||||
"Google Model": "Mô hình Google",
|
||||
"MistralAI API Key": "Khóa API MistralAI",
|
||||
"MistralAI Model": "Mô hình MistralAI",
|
||||
|
@ -406,7 +406,7 @@
|
||||
"Alt Method": "备用方法",
|
||||
"AI21 API Key": "AI21 API 密钥",
|
||||
"AI21 Model": "AI21 模型",
|
||||
"MakerSuite API Key": "MakerSuite API 密钥",
|
||||
"Google AI Studio API Key": "Google AI Studio API 密钥",
|
||||
"Google Model": "Google 模型",
|
||||
"MistralAI API Key": "MistralAI API 密钥",
|
||||
"MistralAI Model": "MistralAI 模型",
|
||||
|
@ -391,7 +391,7 @@
|
||||
"Alt Method": "替代方法",
|
||||
"AI21 API Key": "AI21 API 金鑰",
|
||||
"AI21 Model": "AI21 模型",
|
||||
"MakerSuite API Key": "MakerSuite API 金鑰",
|
||||
"Google AI Studio API Key": "Google AI Studio API 金鑰",
|
||||
"Google Model": "Google 模型",
|
||||
"MistralAI API Key": "MistralAI API 金鑰",
|
||||
"MistralAI Model": "MistralAI 模型",
|
||||
|
@ -20,7 +20,7 @@
|
||||
<option value="zerooneai">01.AI (Yi)</option>
|
||||
<option value="anthropic">Anthropic</option>
|
||||
<option value="custom" data-i18n="Custom (OpenAI-compatible)">Custom (OpenAI-compatible)</option>
|
||||
<option value="google">Google MakerSuite</option>
|
||||
<option value="google">Google AI Studio</option>
|
||||
<option value="koboldcpp">KoboldCpp</option>
|
||||
<option value="llamacpp">llama.cpp</option>
|
||||
<option value="ollama">Ollama</option>
|
||||
|
@ -141,7 +141,7 @@ function throwIfInvalidModel(useReverseProxy) {
|
||||
}
|
||||
|
||||
if (extension_settings.caption.multimodal_api === 'google' && !secret_state[SECRET_KEYS.MAKERSUITE] && !useReverseProxy) {
|
||||
throw new Error('MakerSuite API key is not set.');
|
||||
throw new Error('Google AI Studio API key is not set.');
|
||||
}
|
||||
|
||||
if (extension_settings.caption.multimodal_api === 'ollama' && !textgenerationwebui_settings.server_urls[textgen_types.OLLAMA]) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
<select id="vectors_source" class="text_pole">
|
||||
<option value="cohere">Cohere</option>
|
||||
<option value="extras">Extras</option>
|
||||
<option value="palm">Google MakerSuite</option>
|
||||
<option value="palm">Google AI Studio</option>
|
||||
<option value="llamacpp">llama.cpp</option>
|
||||
<option value="transformers" data-i18n="Local (Transformers)">Local (Transformers)</option>
|
||||
<option value="mistral">MistralAI</option>
|
||||
|
@ -4473,7 +4473,7 @@ async function onConnectButtonClick(e) {
|
||||
}
|
||||
|
||||
if (!secret_state[SECRET_KEYS.MAKERSUITE] && !oai_settings.reverse_proxy) {
|
||||
console.log('No secret key saved for MakerSuite');
|
||||
console.log('No secret key saved for Google AI Studio');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
const apiKey = request.body.reverse_proxy ? request.body.proxy_password : readSecret(request.user.directories, SECRET_KEYS.MAKERSUITE);
|
||||
|
||||
if (!request.body.reverse_proxy && !apiKey) {
|
||||
console.log('MakerSuite API key is missing.');
|
||||
console.log('Google AI Studio API key is missing.');
|
||||
return response.status(400).send({ error: true });
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
}
|
||||
|
||||
const body = isGemini ? getGeminiBody() : getBisonBody();
|
||||
console.log('MakerSuite request:', body);
|
||||
console.log('Google AI Studio request:', body);
|
||||
|
||||
try {
|
||||
const controller = new AbortController();
|
||||
@ -362,7 +362,7 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
}
|
||||
} else {
|
||||
if (!generateResponse.ok) {
|
||||
console.log(`MakerSuite API returned error: ${generateResponse.status} ${generateResponse.statusText} ${await generateResponse.text()}`);
|
||||
console.log(`Google AI Studio API returned error: ${generateResponse.status} ${generateResponse.statusText} ${await generateResponse.text()}`);
|
||||
return response.status(generateResponse.status).send({ error: true });
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
|
||||
const candidates = generateResponseJson?.candidates;
|
||||
if (!candidates || candidates.length === 0) {
|
||||
let message = 'MakerSuite API returned no candidate';
|
||||
let message = 'Google AI Studio API returned no candidate';
|
||||
console.log(message, generateResponseJson);
|
||||
if (generateResponseJson?.promptFeedback?.blockReason) {
|
||||
message += `\nPrompt was blocked due to : ${generateResponseJson.promptFeedback.blockReason}`;
|
||||
@ -381,19 +381,19 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
const responseContent = candidates[0].content ?? candidates[0].output;
|
||||
const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.[0]?.text;
|
||||
if (!responseText) {
|
||||
let message = 'MakerSuite Candidate text empty';
|
||||
let message = 'Google AI Studio Candidate text empty';
|
||||
console.log(message, generateResponseJson);
|
||||
return response.send({ error: { message } });
|
||||
}
|
||||
|
||||
console.log('MakerSuite response:', responseText);
|
||||
console.log('Google AI Studio response:', responseText);
|
||||
|
||||
// Wrap it back to OAI format
|
||||
const reply = { choices: [{ 'message': { 'content': responseText } }] };
|
||||
return response.send(reply);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('Error communicating with MakerSuite API: ', error);
|
||||
console.log('Error communicating with Google AI Studio API: ', error);
|
||||
if (!response.headersSent) {
|
||||
return response.status(500).send({ error: true });
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ router.post('/caption-image', jsonParser, async (request, response) => {
|
||||
|
||||
if (!result.ok) {
|
||||
const error = await result.json();
|
||||
console.log(`MakerSuite API returned error: ${result.status} ${result.statusText}`, error);
|
||||
console.log(`Google AI Studio API returned error: ${result.status} ${result.statusText}`, error);
|
||||
return response.status(result.status).send({ error: true });
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@ async function getMakerSuiteVector(text, directories) {
|
||||
const key = readSecret(directories, SECRET_KEYS.MAKERSUITE);
|
||||
|
||||
if (!key) {
|
||||
console.log('No MakerSuite key found');
|
||||
throw new Error('No MakerSuite key found');
|
||||
console.log('No Google AI Studio key found');
|
||||
throw new Error('No Google AI Studio key found');
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
if (!response.ok) {
|
||||
const text = await response.text();
|
||||
console.log('MakerSuite request failed', response.statusText, text);
|
||||
throw new Error('MakerSuite request failed');
|
||||
console.log('Google AI Studio request failed', response.statusText, text);
|
||||
throw new Error('Google AI Studio request failed');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
Loading…
x
Reference in New Issue
Block a user