mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
✨ feat: support groq as a model provider (#1569)
* ✨ feat: support model provider groq (#1562) * add Groq localization (#1570) * 🐛 fix: fix groq logo and document * 🌐 style: add i18n --------- Co-authored-by: Jiaqi Cai <45190310+jcdiv47@users.noreply.github.com> Co-authored-by: PedroZ <sdustpedro@gmail.com>
This commit is contained in:
parent
04b9c1d6d4
commit
a04c364f04
75 changed files with 577 additions and 21 deletions
16
.env.example
16
.env.example
|
|
@ -73,19 +73,25 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
|||
########### Mistral AI Service ##########
|
||||
########################################
|
||||
|
||||
#MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
########################################
|
||||
######### Perplexity Service ##########
|
||||
######### Perplexity Service ###########
|
||||
########################################
|
||||
|
||||
#PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
########################################
|
||||
######### Anthropic Service ##########
|
||||
######### Anthropic Service ############
|
||||
########################################
|
||||
|
||||
#ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
########################################
|
||||
############ Groq Service ##############
|
||||
########################################
|
||||
|
||||
# GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
########################################
|
||||
############ Market Service ############
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { Callout } from 'nextra/components';
|
||||
|
||||
# Model Service Providers
|
||||
|
||||
When deploying LobeChat, a rich set of environment variables related to model service providers is provided, allowing you to easily define the model service providers to be enabled in LobeChat.
|
||||
|
|
@ -163,6 +161,15 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
|
|||
- Default: -
|
||||
- Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx`
|
||||
|
||||
## Groq AI
|
||||
|
||||
### `GROQ_API_KEY`
|
||||
|
||||
- Type: Required
|
||||
- Description: This is the API key you applied from Groq AI
|
||||
- Default: -
|
||||
- Example: `gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
||||
|
||||
## Mistral AI
|
||||
|
||||
### `MISTRAL_API_KEY`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { Callout } from 'nextra/components';
|
||||
|
||||
# 模型服务商
|
||||
|
||||
LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,你可以使用这些环境变量轻松定义需要在 LobeChat 中开启的模型服务商。
|
||||
|
|
@ -170,4 +168,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
|
|||
- 默认值:-
|
||||
- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
|
||||
|
||||
## Groq AI
|
||||
|
||||
### `GROQ_API_KEY`
|
||||
|
||||
- 类型:必选
|
||||
- 描述:这是你在 Groq AI 服务中申请的 API 密钥
|
||||
- 默认值:-
|
||||
- 示例:`gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
||||
|
||||
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "أزور",
|
||||
"bedrock": "بيدروك لأمازون ويب سيرفيس",
|
||||
"google": "جوجل",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "مونشوت الذكاء الاصطناعي",
|
||||
"ollama": "أولاما",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "حدث خطأ في طلب خدمة Azure AI، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
|
||||
"BedrockBizError": "حدث خطأ في طلب خدمة Bedrock، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
|
||||
"GoogleBizError": "حدث خطأ في طلب خدمة Google، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
|
||||
"GroqBizError": "حدث خطأ في خدمة Groq ، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
|
||||
"InvalidAccessCode": "كلمة المرور غير صحيحة أو فارغة، يرجى إدخال كلمة مرور الوصول الصحيحة أو إضافة مفتاح API مخصص",
|
||||
"InvalidAnthropicAPIKey": "مفتاح Anthropic API غير صحيح أو فارغ، يرجى التحقق من مفتاح Anthropic API وإعادة المحاولة",
|
||||
"InvalidAzureAPIKey": "مفتاح Azure API غير صحيح أو فارغ، يرجى التحقق من مفتاح Azure API وإعادة المحاولة",
|
||||
"InvalidBedrockCredentials": "فشلت مصادقة Bedrock، يرجى التحقق من AccessKeyId/SecretAccessKey وإعادة المحاولة",
|
||||
"InvalidGoogleAPIKey": "مفتاح Google API غير صحيح أو فارغ، يرجى التحقق من مفتاح Google API وإعادة المحاولة",
|
||||
"InvalidGroqAPIKey": "مفتاح Groq API غير صحيح أو فارغ، يرجى التحقق من مفتاح Groq API وإعادة المحاولة",
|
||||
"InvalidMistralAPIKey": "مفتاح Mistral AI API غير صحيح أو فارغ، يرجى التحقق من مفتاح Mistral API وإعادة المحاولة",
|
||||
"InvalidMoonshotAPIKey": "مفتاح API لـ Moonshot AI غير صحيح أو فارغ، يرجى التحقق من مفتاح API لـ Moonshot وإعادة المحاولة",
|
||||
"InvalidOllamaArgs": "تكوين Ollama غير صحيح، يرجى التحقق من تكوين Ollama وإعادة المحاولة",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "أدخل مفتاح Google API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
|
||||
"title": "استخدام مفتاح Google API المخصص"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "قم بإدخال مفتاح API الخاص بك لـ Groq للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
|
||||
"title": "استخدام مفتاح API الخاص بـ Groq المخصص"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "أدخل مفتاح Mistral AI API الخاص بك لبدء الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية الخاص بك من قبل التطبيق",
|
||||
"title": "استخدام مفتاح Mistral AI API المخصص"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "مفتاح واجهة برمجة التطبيقات"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "أدخل مفتاح API الخاص بـ Groq",
|
||||
"placeholder": "مفتاح API Groq",
|
||||
"title": "مفتاح API"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral KI",
|
||||
"moonshot": "Moonshot KI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Es ist ein Fehler bei der Anforderung des Azure AI-Dienstes aufgetreten. Bitte überprüfen Sie die folgenden Informationen oder versuchen Sie es erneut.",
|
||||
"BedrockBizError": "Es ist ein Fehler bei der Anforderung des Bedrock-Dienstes aufgetreten. Bitte überprüfen Sie die folgenden Informationen oder versuchen Sie es erneut.",
|
||||
"GoogleBizError": "Es ist ein Fehler bei der Anforderung des Google-Dienstes aufgetreten. Bitte überprüfen Sie die folgenden Informationen oder versuchen Sie es erneut.",
|
||||
"GroqBizError": "Die Anfrage an den Groq-Dienst ist fehlgeschlagen. Bitte überprüfen Sie die folgenden Informationen oder versuchen Sie es erneut.",
|
||||
"InvalidAccessCode": "Das Passwort ist ungültig oder leer. Bitte geben Sie das richtige Zugangspasswort ein oder fügen Sie einen benutzerdefinierten API-Schlüssel hinzu.",
|
||||
"InvalidAnthropicAPIKey": "Ungültiger oder leerer Anthropic API-Schlüssel. Bitte überprüfen Sie den Anthropic API-Schlüssel und versuchen Sie es erneut.",
|
||||
"InvalidAzureAPIKey": "Der Azure API-Schlüssel ist ungültig oder leer. Bitte überprüfen Sie den Azure API-Schlüssel und versuchen Sie es erneut.",
|
||||
"InvalidBedrockCredentials": "Die Bedrock-Authentifizierung ist fehlgeschlagen. Bitte überprüfen Sie AccessKeyId/SecretAccessKey und versuchen Sie es erneut.",
|
||||
"InvalidGoogleAPIKey": "Der Google API-Schlüssel ist ungültig oder leer. Bitte überprüfen Sie den Google API-Schlüssel und versuchen Sie es erneut.",
|
||||
"InvalidGroqAPIKey": "Der Groq API-Schlüssel ist ungültig oder leer. Bitte überprüfen Sie den Groq API-Schlüssel und versuchen Sie es erneut.",
|
||||
"InvalidMistralAPIKey": "Der Mistral AI-API-Schlüssel ist ungültig oder leer. Bitte überprüfen Sie den Mistral-API-Schlüssel und versuchen Sie es erneut.",
|
||||
"InvalidMoonshotAPIKey": "Ungültiger oder leerer Moonshot AI API-Schlüssel. Bitte überprüfen Sie den Moonshot API-Schlüssel und versuchen Sie es erneut.",
|
||||
"InvalidOllamaArgs": "Ollama-Konfiguration ist ungültig. Bitte überprüfen Sie die Ollama-Konfiguration und versuchen Sie es erneut.",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Geben Sie Ihren Google API-Schlüssel ein, um die Sitzung zu starten. Die Anwendung speichert Ihren API-Schlüssel nicht.",
|
||||
"title": "Verwenden von benutzerdefinierten Google API-Schlüssel"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Geben Sie Ihren individuellen Groq-API-Schlüssel ein, um die Sitzung zu starten. Die Anwendung speichert Ihren API-Schlüssel nicht.",
|
||||
"title": "Verwenden Sie einen benutzerdefinierten Groq-API-Schlüssel"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Geben Sie Ihren eigenen Mistral AI-API-Schlüssel ein, um die Sitzung zu starten. Die App speichert Ihren API-Schlüssel nicht.",
|
||||
"title": "Verwenden Sie einen benutzerdefinierten Mistral AI-API-Schlüssel"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API-Schlüssel"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Geben Sie den API-Schlüssel von Groq ein",
|
||||
"placeholder": "Groq API-Schlüssel",
|
||||
"title": "API-Schlüssel"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral KI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Error requesting Azure AI service. Please troubleshoot or retry based on the following information.",
|
||||
"BedrockBizError": "Error requesting Bedrock service. Please troubleshoot or retry based on the following information.",
|
||||
"GoogleBizError": "Error requesting Google service. Please troubleshoot or retry based on the following information.",
|
||||
"GroqBizError": "Error occurred while requesting Groq service. Please troubleshoot based on the following information or retry.",
|
||||
"InvalidAccessCode": "Invalid access code or empty. Please enter the correct access code or add a custom API Key.",
|
||||
"InvalidAnthropicAPIKey": "The Anthropic API Key is incorrect or empty. Please check the Anthropic API Key and retry.",
|
||||
"InvalidAzureAPIKey": "Azure API Key is incorrect or empty. Please check the Azure API Key and retry.",
|
||||
"InvalidBedrockCredentials": "Bedrock authentication failed. Please check the AccessKeyId/SecretAccessKey and retry.",
|
||||
"InvalidGoogleAPIKey": "Google API Key is incorrect or empty. Please check the Google API Key and retry.",
|
||||
"InvalidGroqAPIKey": "Groq API Key is incorrect or empty. Please check the Groq API Key and retry.",
|
||||
"InvalidMistralAPIKey": "Incorrect or empty Mistral AI API Key. Please check your Mistral API Key and try again.",
|
||||
"InvalidMoonshotAPIKey": "The Moonshot AI API Key is incorrect or empty, please check the Moonshot API Key and try again.",
|
||||
"InvalidOllamaArgs": "Invalid Ollama configuration, please check Ollama configuration and try again",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Enter your Google API Key to start the session. The app will not store your API Key.",
|
||||
"title": "Use custom Google API Key"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Enter your Groq API Key to start the session. The application will not store your API Key.",
|
||||
"title": "Use Custom Groq API Key"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Enter your Mistral AI API Key to start the session. The application will not store your API Key.",
|
||||
"title": "Use Custom Mistral AI API Key"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Enter the API Key from Groq",
|
||||
"placeholder": "Groq API Key",
|
||||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral IA",
|
||||
"moonshot": "Moonshot IA",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Se produjo un error al solicitar el servicio de Azure AI, por favor, verifica la siguiente información o inténtalo de nuevo",
|
||||
"BedrockBizError": "Se produjo un error al solicitar el servicio de Bedrock, por favor, verifica la siguiente información o inténtalo de nuevo",
|
||||
"GoogleBizError": "Se produjo un error al solicitar el servicio de Google, por favor, verifica la siguiente información o inténtalo de nuevo",
|
||||
"GroqBizError": "Se produjo un error al solicitar el servicio Groq. Por favor, revise la siguiente información o inténtelo de nuevo",
|
||||
"InvalidAccessCode": "La contraseña no es válida o está vacía. Por favor, introduce una contraseña de acceso válida o añade una clave API personalizada",
|
||||
"InvalidAnthropicAPIKey": "La clave de API de Anthropic es incorrecta o está vacía. Por favor, revisa la clave de API de Anthropic e inténtalo de nuevo.",
|
||||
"InvalidAzureAPIKey": "La clave de API de Azure es incorrecta o está vacía, por favor, verifica la clave de API de Azure e inténtalo de nuevo",
|
||||
"InvalidBedrockCredentials": "La autenticación de Bedrock no se ha completado con éxito, por favor, verifica AccessKeyId/SecretAccessKey e inténtalo de nuevo",
|
||||
"InvalidGoogleAPIKey": "La clave de API de Google es incorrecta o está vacía, por favor, verifica la clave de API de Google e inténtalo de nuevo",
|
||||
"InvalidGroqAPIKey": "La clave de API de Groq es incorrecta o está vacía. Por favor, revisa la clave de API de Groq e inténtalo de nuevo.",
|
||||
"InvalidMistralAPIKey": "La clave de API de Mistral AI es incorrecta o está vacía. Por favor, revise la clave de API de Mistral y vuelva a intentarlo.",
|
||||
"InvalidMoonshotAPIKey": "La clave de API de Moonshot AI no es válida o está vacía. Por favor, revise la clave de API de Moonshot e inténtelo de nuevo.",
|
||||
"InvalidOllamaArgs": "La configuración de Ollama no es válida, por favor revisa la configuración de Ollama e inténtalo de nuevo",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Ingresa tu clave de API de Google para comenzar la sesión. La aplicación no guardará tu clave de API",
|
||||
"title": "Usar clave de API personalizada de Google"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Ingresa tu clave de API de Groq para comenzar la sesión. La aplicación no almacenará tu clave de API",
|
||||
"title": "Usar clave de API personalizada de Groq"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Ingrese su clave de API de Mistral AI para comenzar la sesión. La aplicación no almacenará su clave de API.",
|
||||
"title": "Usar clave de API personalizada de Mistral AI"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "Clave API"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Ingresa la clave API de Groq",
|
||||
"placeholder": "Clave API de Groq",
|
||||
"title": "Clave API"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot IA",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Erreur lors de la demande de service Azure AI, veuillez vérifier les informations ci-dessous ou réessayer",
|
||||
"BedrockBizError": "Erreur lors de la demande de service Bedrock, veuillez vérifier les informations ci-dessous ou réessayer",
|
||||
"GoogleBizError": "Erreur lors de la demande de service Google, veuillez vérifier les informations ci-dessous ou réessayer",
|
||||
"GroqBizError": "Une erreur s'est produite lors de la demande de service Groq. Veuillez vérifier les informations ci-dessous ou réessayer.",
|
||||
"InvalidAccessCode": "Le mot de passe est incorrect ou vide. Veuillez saisir le mot de passe d'accès correct ou ajouter une clé API personnalisée.",
|
||||
"InvalidAnthropicAPIKey": "La clé API Anthropic est incorrecte ou manquante. Veuillez vérifier la clé API Anthropic et réessayer.",
|
||||
"InvalidAzureAPIKey": "Clé API Azure incorrecte ou vide, veuillez vérifier la clé API Azure et réessayer",
|
||||
"InvalidBedrockCredentials": "L'authentification Bedrock a échoué, veuillez vérifier AccessKeyId/SecretAccessKey et réessayer",
|
||||
"InvalidGoogleAPIKey": "Clé API Google incorrecte ou vide, veuillez vérifier la clé API Google et réessayer",
|
||||
"InvalidGroqAPIKey": "Clé API Groq incorrecte ou vide, veuillez vérifier la clé API Groq et réessayer",
|
||||
"InvalidMistralAPIKey": "Clé API Mistral AI incorrecte ou manquante. Veuillez vérifier la clé API Mistral et réessayer.",
|
||||
"InvalidMoonshotAPIKey": "Clé API Moonshot AI incorrecte ou manquante. Veuillez vérifier la clé API Moonshot et réessayer.",
|
||||
"InvalidOllamaArgs": "La configuration d'Ollama n'est pas valide, veuillez vérifier la configuration d'Ollama et réessayer",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Entrez votre clé API Google pour commencer la session. L'application ne conservera pas votre clé API",
|
||||
"title": "Utiliser une clé API Google personnalisée"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Entrez votre clé d'API Groq pour commencer la session. L'application ne stockera pas votre clé d'API.",
|
||||
"title": "Utiliser une clé d'API Groq personnalisée"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Entrez votre clé API Mistral AI pour commencer la session. L'application ne stockera pas votre clé API.",
|
||||
"title": "Utiliser une clé API Mistral AI personnalisée"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "Clé API"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Entrez la clé API de Groq",
|
||||
"placeholder": "Clé API Groq",
|
||||
"title": "Clé API"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Errore nella richiesta del servizio Azure AI, controlla le informazioni seguenti o riprova",
|
||||
"BedrockBizError": "Errore nella richiesta del servizio Bedrock, controlla le informazioni seguenti o riprova",
|
||||
"GoogleBizError": "Errore nella richiesta del servizio Google, controlla le informazioni seguenti o riprova",
|
||||
"GroqBizError": "Errore del servizio Groq, controlla le informazioni seguenti o riprova",
|
||||
"InvalidAccessCode": "Password incorrect or empty, please enter the correct access password, or add a custom API Key",
|
||||
"InvalidAnthropicAPIKey": "La chiave API Anthropic non è valida o è vuota. Si prega di controllare la chiave API Anthropic e riprovare.",
|
||||
"InvalidAzureAPIKey": "Chiave API Azure non corretta o vuota, controlla la chiave API Azure e riprova",
|
||||
"InvalidBedrockCredentials": "Autenticazione Bedrock non riuscita, controlla AccessKeyId/SecretAccessKey e riprova",
|
||||
"InvalidGoogleAPIKey": "Chiave API Google non corretta o vuota, controlla la chiave API Google e riprova",
|
||||
"InvalidGroqAPIKey": "Chiave API Groq non valida o vuota, controlla la chiave API Groq e riprova",
|
||||
"InvalidMistralAPIKey": "Chiave API Mistral AI non valida o vuota. Si prega di controllare la chiave API Mistral e riprovare.",
|
||||
"InvalidMoonshotAPIKey": "La chiave API di Moonshot AI non è corretta o è vuota, si prega di controllare la chiave API di Moonshot e riprovare",
|
||||
"InvalidOllamaArgs": "Configurazione Ollama non valida, controllare la configurazione di Ollama e riprovare",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Inserisci la tua chiave API Google per iniziare la sessione. L'applicazione non memorizzerà la tua chiave API",
|
||||
"title": "Utilizza la chiave API Google personalizzata"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Inserisci la tua chiave API Groq per iniziare la sessione. L'applicazione non memorizzerà la tua chiave API",
|
||||
"title": "Usa una chiave API Groq personalizzata"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Inserisci la tua chiave API Mistral AI per iniziare la sessione. L'applicazione non memorizzerà la tua chiave API.",
|
||||
"title": "Utilizza una chiave API personalizzata per Mistral AI"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "Chiave API"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Inserisci la chiave API da Groq",
|
||||
"placeholder": "Chiave API Groq",
|
||||
"title": "Chiave API"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWSベッドロック",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "オラマ",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Azure AIサービスのリクエストでエラーが発生しました。以下の情報に基づいてトラブルシューティングを行うか、再試行してください。",
|
||||
"BedrockBizError": "Bedrockサービスのリクエストでエラーが発生しました。以下の情報に基づいてトラブルシューティングを行うか、再試行してください。",
|
||||
"GoogleBizError": "Googleサービスのリクエストでエラーが発生しました。以下の情報に基づいてトラブルシューティングを行うか、再試行してください。",
|
||||
"GroqBizError": "Groqサービスのリクエストでエラーが発生しました。以下の情報を確認して再試行してください。",
|
||||
"InvalidAccessCode": "パスワードが正しくないか空です。正しいアクセスパスワードを入力するか、カスタムAPIキーを追加してください",
|
||||
"InvalidAnthropicAPIKey": "Anthropic APIキーが正しくないか空です。Anthropic APIキーを確認してもう一度お試しください。",
|
||||
"InvalidAzureAPIKey": "Azure APIキーが正しくないか空です。Azure APIキーを確認してから再試行してください。",
|
||||
"InvalidBedrockCredentials": "Bedrockの認証に失敗しました。AccessKeyId/SecretAccessKeyを確認してから再試行してください。",
|
||||
"InvalidGoogleAPIKey": "Google APIキーが正しくないか空です。Google APIキーを確認してから再試行してください。",
|
||||
"InvalidGroqAPIKey": "Groq APIキーが正しくないか空です。Groq APIキーを確認して再試行してください。",
|
||||
"InvalidMistralAPIKey": "Mistral AI API キーが正しくないか空です。Mistral API キーを確認して再試行してください。",
|
||||
"InvalidMoonshotAPIKey": "Moonshot AI APIキーが正しくないか空です。Moonshot APIキーを確認して再試行してください。",
|
||||
"InvalidOllamaArgs": "Ollamaの設定が正しくありません。Ollamaの設定を確認してからもう一度お試しください",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Google APIキーを入力してセッションを開始します。アプリはAPIキーを記録しません。",
|
||||
"title": "カスタムGoogle APIキーを使用"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Groq APIキーを入力してセッションを開始します。アプリはAPIキーを記録しません。",
|
||||
"title": "カスタムGroq APIキーを使用"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Mistral AI API キーを入力してセッションを開始できます。アプリは API キーを記録しません。",
|
||||
"title": "カスタム Mistral AI API キーの使用"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "APIキー"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Groq からの API キーを入力してください",
|
||||
"placeholder": "Groq API キー",
|
||||
"title": " API キー"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "문샷 AI",
|
||||
"ollama": "올라마",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Azure AI 서비스 요청 중 오류가 발생했습니다. 아래 정보를 확인하고 다시 시도하십시오.",
|
||||
"BedrockBizError": "Bedrock 서비스 요청 중 오류가 발생했습니다. 아래 정보를 확인하고 다시 시도하십시오.",
|
||||
"GoogleBizError": "Google 서비스 요청 중 오류가 발생했습니다. 아래 정보를 확인하고 다시 시도하십시오.",
|
||||
"GroqBizError": "Groq 서비스 요청 중 오류가 발생했습니다. 아래 정보를 확인하고 다시 시도해주세요.",
|
||||
"InvalidAccessCode": "액세스 코드가 잘못되었거나 비어 있습니다. 올바른 액세스 코드를 입력하거나 사용자 지정 API 키를 추가하십시오.",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API 키가 잘못되었거나 비어 있습니다. Anthropic API 키를 확인하고 다시 시도하십시오.",
|
||||
"InvalidAzureAPIKey": "잘못된 또는 비어 있는 Azure API Key입니다. Azure API Key를 확인한 후 다시 시도하십시오.",
|
||||
"InvalidBedrockCredentials": "Bedrock 인증에 실패했습니다. AccessKeyId/SecretAccessKey를 확인한 후 다시 시도하십시오.",
|
||||
"InvalidGoogleAPIKey": "잘못된 또는 비어 있는 Google API Key입니다. Google API Key를 확인한 후 다시 시도하십시오.",
|
||||
"InvalidGroqAPIKey": "잘못된 또는 비어 있는 Groq API Key입니다. Groq API Key를 확인한 후 다시 시도하십시오.",
|
||||
"InvalidMistralAPIKey": "Mistral AI API 키가 잘못되었거나 비어 있습니다. Mistral API 키를 확인한 후 다시 시도해주세요.",
|
||||
"InvalidMoonshotAPIKey": "Moonshot AI API 키가 잘못되었거나 비어 있습니다. Moonshot API 키를 확인한 후 다시 시도해주세요.",
|
||||
"InvalidOllamaArgs": "Ollama 구성이 잘못되었습니다. Ollama 구성을 확인한 후 다시 시도하십시오.",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Google API Key를 입력하여 세션을 시작합니다. 앱은 귀하의 API Key를 기록하지 않습니다.",
|
||||
"title": "사용자 정의 Google API Key 사용"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Groq API 키를 입력하면 세션을 시작할 수 있습니다. 애플리케이션은 API 키를 기록하지 않습니다.",
|
||||
"title": "사용자 지정 Groq API 키 사용"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Mistral AI API 키를 입력하면 세션을 시작할 수 있습니다. 애플리케이션은 API 키를 기록하지 않습니다.",
|
||||
"title": "사용자 지정 Mistral AI API 키 사용"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Groq의 API 키를 입력하세요",
|
||||
"placeholder": "Groq API 키",
|
||||
"title": "API 키"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Error requesting Azure AI service, please troubleshoot or retry based on the following information",
|
||||
"BedrockBizError": "Error requesting Bedrock service, please troubleshoot or retry based on the following information",
|
||||
"GoogleBizError": "Error requesting Google service, please troubleshoot or retry based on the following information",
|
||||
"GroqBizError": "Er is een fout opgetreden bij het aanroepen van de Groq-service. Controleer de onderstaande informatie of probeer het opnieuw.",
|
||||
"InvalidAccessCode": "Ongeldige toegangscode: het wachtwoord is onjuist of leeg. Voer de juiste toegangscode in of voeg een aangepaste API-sleutel toe.",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API Key is onjuist of leeg. Controleer de Anthropic API Key en probeer het opnieuw.",
|
||||
"InvalidAzureAPIKey": "Incorrect or empty Azure API Key, please check the Azure API Key and retry",
|
||||
"InvalidBedrockCredentials": "Bedrock authentication failed, please check AccessKeyId/SecretAccessKey and retry",
|
||||
"InvalidGoogleAPIKey": "Incorrect or empty Google API Key, please check the Google API Key and retry",
|
||||
"InvalidGroqAPIKey": "Groq API Key is onjuist of leeg. Controleer de Groq API Key en probeer het opnieuw.",
|
||||
"InvalidMistralAPIKey": "Ongeldige of lege Mistral AI API-sleutel. Controleer de Mistral API-sleutel en probeer het opnieuw.",
|
||||
"InvalidMoonshotAPIKey": "Moonshot AI API密钥不正确或为空,请检查Moonshot API密钥后重试",
|
||||
"InvalidOllamaArgs": "Ollama-configuratie is onjuist, controleer de Ollama-configuratie en probeer het opnieuw",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Enter your Google API Key to start the session. The app will not record your API Key",
|
||||
"title": "Use custom Google API Key"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Voer je Groq API-sleutel in om te beginnen met de sessie. De app zal je API-sleutel niet opslaan.",
|
||||
"title": "Gebruik een aangepaste Groq API-sleutel"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Voer je Mistral AI API-sleutel in om een sessie te starten. De app slaat je API-sleutel niet op.",
|
||||
"title": "Gebruik aangepaste Mistral AI API-sleutel"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API-sleutel"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Voer de API-sleutel van Groq in",
|
||||
"placeholder": "Groq API-sleutel",
|
||||
"title": "API-sleutel"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Wystąpił błąd żądania usługi Azure AI, prosimy o sprawdzenie poniższych informacji lub ponowne próbowanie.",
|
||||
"BedrockBizError": "Wystąpił błąd żądania usługi Bedrock, prosimy o sprawdzenie poniższych informacji lub ponowne próbowanie.",
|
||||
"GoogleBizError": "Wystąpił błąd żądania usługi Google, prosimy o sprawdzenie poniższych informacji lub ponowne próbowanie.",
|
||||
"GroqBizError": "Wystąpił błąd usługi Groq. Sprawdź poniższe informacje lub spróbuj ponownie.",
|
||||
"InvalidAccessCode": "Nieprawidłowy kod dostępu: Hasło jest nieprawidłowe lub puste. Proszę wprowadzić poprawne hasło dostępu lub dodać niestandardowy klucz API.",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API Key jest nieprawidłowy lub pusty. Sprawdź poprawność klucza API Anthropic i spróbuj ponownie.",
|
||||
"InvalidAzureAPIKey": "Nieprawidłowy lub pusty klucz API Azure, prosimy sprawdzić klucz API Azure i spróbować ponownie.",
|
||||
"InvalidBedrockCredentials": "Uwierzytelnienie Bedrock nie powiodło się, prosimy sprawdzić AccessKeyId/SecretAccessKey i spróbować ponownie.",
|
||||
"InvalidGoogleAPIKey": "Nieprawidłowy lub pusty klucz API Google, prosimy sprawdzić klucz API Google i spróbować ponownie.",
|
||||
"InvalidGroqAPIKey": "Nieprawidłowy klucz API Groq, prosimy sprawdzić klucz API Groq i spróbować ponownie.",
|
||||
"InvalidMistralAPIKey": "Mistral AI API Key 不正确或为空,请检查 Mistral API Key 后重试",
|
||||
"InvalidMoonshotAPIKey": "Moonshot AI API密钥不正确或为空,请检查Moonshot API密钥后重试",
|
||||
"InvalidOllamaArgs": "Nieprawidłowa konfiguracja Ollama, sprawdź konfigurację Ollama i spróbuj ponownie",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Wprowadź swój klucz API Google, aby rozpocząć sesję. Aplikacja nie będzie przechowywać Twojego klucza API.",
|
||||
"title": "Użyj niestandardowego klucza API Google"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Wprowadź swój klucz API Groq, aby rozpocząć sesję. Aplikacja nie będzie przechowywać Twojego klucza API.",
|
||||
"title": "Użyj niestandardowego klucza API Groq"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "输入你的 Mistral AI API Key 即可开始会话。应用不会记录你的 API Key",
|
||||
"title": "使用自定义 Mistral AI API Key"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "Klucz API"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Wprowadź klucz API z Groq",
|
||||
"placeholder": " Klucz API Groq",
|
||||
"title": " Klucz API"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot IA",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Erro ao solicitar o serviço Azure AI, por favor, verifique as informações abaixo ou tente novamente",
|
||||
"BedrockBizError": "Erro ao solicitar o serviço Bedrock, por favor, verifique as informações abaixo ou tente novamente",
|
||||
"GoogleBizError": "Erro ao solicitar o serviço Google, por favor, verifique as informações abaixo ou tente novamente",
|
||||
"GroqBizError": "O serviço Groq encontrou um erro. Por favor, verifique as informações abaixo ou tente novamente.",
|
||||
"InvalidAccessCode": "Senha de acesso inválida ou em branco. Por favor, insira a senha de acesso correta ou adicione uma Chave de API personalizada.",
|
||||
"InvalidAnthropicAPIKey": "A chave da API Anthropic está incorreta ou vazia. Por favor, verifique a chave da API Anthropic e tente novamente.",
|
||||
"InvalidAzureAPIKey": "Chave de API Azure incorreta ou vazia, por favor, verifique a chave de API Azure e tente novamente",
|
||||
"InvalidBedrockCredentials": "Credenciais Bedrock inválidas, por favor, verifique AccessKeyId/SecretAccessKey e tente novamente",
|
||||
"InvalidGoogleAPIKey": "Chave de API Google incorreta ou vazia, por favor, verifique a chave de API Google e tente novamente",
|
||||
"InvalidGroqAPIKey": "Chave de API Groq AI inválida ou em branco, verifique a chave de API Groq e tente novamente",
|
||||
"InvalidMistralAPIKey": "Chave de API Mistral AI inválida ou vazia. Por favor, verifique a chave de API Mistral e tente novamente.",
|
||||
"InvalidMoonshotAPIKey": "A chave da API Moonshot AI está incorreta ou vazia. Por favor, verifique a chave da API Moonshot e tente novamente.",
|
||||
"InvalidOllamaArgs": "Configuração Ollama inválida, verifique a configuração do Ollama e tente novamente",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Digite sua chave de API Google para iniciar a sessão. O aplicativo não irá armazenar sua chave de API",
|
||||
"title": "Usar chave de API Google personalizada"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Insira sua chave de API Groq para iniciar a sessão. O aplicativo não irá armazenar sua chave de API.",
|
||||
"title": "Usar chave de API Groq personalizada"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Insira sua chave de API Mistral AI para iniciar a sessão. O aplicativo não irá armazenar sua chave de API.",
|
||||
"title": "Usar chave de API Mistral AI personalizada"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Insira a chave da API do Groq",
|
||||
"placeholder": " Chave da API do Groq",
|
||||
"title": "Chave da API"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Искусственный интеллект Moonshot",
|
||||
"ollama": "Оллама",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Ошибка запроса службы Azure AI, пожалуйста, проверьте и повторите попытку в соответствии с предоставленной информацией",
|
||||
"BedrockBizError": "Ошибка запроса службы Bedrock, пожалуйста, проверьте и повторите попытку в соответствии с предоставленной информацией",
|
||||
"GoogleBizError": "Ошибка запроса службы Google, пожалуйста, проверьте и повторите попытку в соответствии с предоставленной информацией",
|
||||
"GroqBizError": "Ошибка обращения к сервису Groq. Пожалуйста, проверьте следующую информацию или повторите попытку",
|
||||
"InvalidAccessCode": "Неверный код доступа: введите правильный код доступа или добавьте пользовательский ключ API",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API Key недействителен или отсутствует. Пожалуйста, проверьте Anthropic API Key и повторите попытку",
|
||||
"InvalidAzureAPIKey": "Неверный или пустой ключ API Azure, пожалуйста, проверьте ключ API Azure и повторите попытку",
|
||||
"InvalidBedrockCredentials": "Аутентификация Bedrock не прошла, пожалуйста, проверьте AccessKeyId/SecretAccessKey и повторите попытку",
|
||||
"InvalidGoogleAPIKey": "Неверный или пустой ключ API Google, пожалуйста, проверьте ключ API Google и повторите попытку",
|
||||
"InvalidGroqAPIKey": "Неверный или пустой ключ API Groq, пожалуйста, проверьте ключ API Groq и повторите попытку",
|
||||
"InvalidMistralAPIKey": "Неверный или пустой ключ API Mistral AI. Пожалуйста, проверьте ключ API Mistral и повторите попытку",
|
||||
"InvalidMoonshotAPIKey": "Moonshot AI API Key неверный или пустой, пожалуйста, проверьте ключ API Moonshot и повторите попытку",
|
||||
"InvalidOllamaArgs": "Неверная конфигурация Ollama, пожалуйста, проверьте конфигурацию Ollama и повторите попытку",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Введите свой ключ API Google, чтобы начать сеанс. Приложение не будет сохранять ваш ключ API",
|
||||
"title": "Использовать пользовательский ключ API Google"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Введите свой ключ API Groq, чтобы начать сеанс. Приложение не будет сохранять ваш ключ API",
|
||||
"title": "Использовать пользовательский ключ API Groq"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Введите свой ключ API Mistral AI, чтобы начать сеанс. Приложение не будет сохранять ваш ключ API",
|
||||
"title": "Использовать пользовательский ключ API Mistral AI"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API-ключ"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Введите API-ключ от Groq",
|
||||
"placeholder": "Ключ API Groq",
|
||||
"title": "API-ключ"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Azure AI servisi isteği hatası, lütfen aşağıdaki bilgilere göre sorunu gidermeye çalışın veya tekrar deneyin",
|
||||
"BedrockBizError": "Bedrock servisi isteği hatası, lütfen aşağıdaki bilgilere göre sorunu gidermeye çalışın veya tekrar deneyin",
|
||||
"GoogleBizError": "Google servisi isteği hatası, lütfen aşağıdaki bilgilere göre sorunu gidermeye çalışın veya tekrar deneyin",
|
||||
"GroqBizError": "Groq hizmeti isteği sırasında bir hata oluştu. Lütfen aşağıdaki bilgilere göre sorunu giderin veya tekrar deneyin",
|
||||
"InvalidAccessCode": "Geçersiz Erişim Kodu: Geçersiz veya boş bir şifre girdiniz. Lütfen doğru erişim şifresini girin veya özel API Anahtarı ekleyin.",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API Key geçersiz veya boş, lütfen Anthropic API Key'inizi kontrol edip tekrar deneyin",
|
||||
"InvalidAzureAPIKey": "Azure API Anahtarı yanlış veya boş, lütfen Azure API Anahtarınızı kontrol edip tekrar deneyin",
|
||||
"InvalidBedrockCredentials": "Bedrock kimlik doğrulaması geçersiz, lütfen AccessKeyId/SecretAccessKey bilgilerinizi kontrol edip tekrar deneyin",
|
||||
"InvalidGoogleAPIKey": "Google API Anahtarı yanlış veya boş, lütfen Google API Anahtarınızı kontrol edip tekrar deneyin",
|
||||
"InvalidGroqAPIKey": "Groq API Anahtarı yanlış veya boş, lütfen Groq API Anahtarınızı kontrol edip tekrar deneyin",
|
||||
"InvalidMistralAPIKey": "Mistral AI API Anahtarı geçersiz veya boş. Lütfen Mistral API Anahtarınızı kontrol edip tekrar deneyin",
|
||||
"InvalidMoonshotAPIKey": "Geçersiz veya boş Moonshot AI API Anahtarı, lütfen Moonshot API Anahtarınızı kontrol edip tekrar deneyin",
|
||||
"InvalidOllamaArgs": "Ollama yapılandırması yanlış, lütfen Ollama yapılandırmasını kontrol edip tekrar deneyin",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Google API Anahtarınızı girerek oturumu başlatabilirsiniz. Uygulama API Anahtarınızı kaydetmez",
|
||||
"title": "Özel Google API Anahtarını kullan"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Oturumu başlatmak için Groq API Anahtarınızı girin. Uygulama API Anahtarınızı kaydetmez",
|
||||
"title": "Özel Groq API Anahtarını Kullan"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Mistral AI API Anahtarınızı girerek oturumu başlatabilirsiniz. Uygulama API Anahtarınızı kaydetmez",
|
||||
"title": "Özel Mistral AI API Anahtarı Kullan"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API Anahtarı"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Groq'dan alınan API Anahtarını girin",
|
||||
"placeholder": "Groq API Anahtarı",
|
||||
"title": "API Anahtarı"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "Yêu cầu dịch vụ Azure AI gặp lỗi, vui lòng kiểm tra và thử lại dựa trên thông tin dưới đây",
|
||||
"BedrockBizError": "Yêu cầu dịch vụ Bedrock gặp lỗi, vui lòng kiểm tra và thử lại dựa trên thông tin dưới đây",
|
||||
"GoogleBizError": "Yêu cầu dịch vụ Google gặp lỗi, vui lòng kiểm tra và thử lại dựa trên thông tin dưới đây",
|
||||
"GroqBizError": "Yêu cầu dịch vụ Groq gặp sự cố, vui lòng kiểm tra thông tin bên dưới hoặc thử lại",
|
||||
"InvalidAccessCode": "Mật khẩu truy cập không hợp lệ hoặc trống, vui lòng nhập mật khẩu truy cập đúng hoặc thêm Khóa API tùy chỉnh",
|
||||
"InvalidAnthropicAPIKey": "Khóa API Anthropic không hợp lệ hoặc trống, vui lòng kiểm tra lại và thử lại",
|
||||
"InvalidAzureAPIKey": "Khóa API Azure không chính xác hoặc trống, vui lòng kiểm tra lại Khóa API Azure và thử lại",
|
||||
"InvalidBedrockCredentials": "Xác thực Bedrock không thành công, vui lòng kiểm tra AccessKeyId/SecretAccessKey và thử lại",
|
||||
"InvalidGoogleAPIKey": "Khóa API Google không chính xác hoặc trống, vui lòng kiểm tra lại Khóa API Google và thử lại",
|
||||
"InvalidGroqAPIKey": "Khóa API Groq không hợp lệ hoặc trống, vui lòng kiểm tra lại Khóa API Groq và thử lại",
|
||||
"InvalidMistralAPIKey": "Mistral AI API Key không hợp lệ hoặc trống, vui lòng kiểm tra lại Mistral API Key và thử lại",
|
||||
"InvalidMoonshotAPIKey": "Khóa API Moonshot AI không hợp lệ hoặc trống, vui lòng kiểm tra lại Khóa API Moonshot và thử lại",
|
||||
"InvalidOllamaArgs": "Cấu hình Ollama không hợp lệ, vui lòng kiểm tra lại cấu hình Ollama và thử lại",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "Nhập Google API Key của bạn để bắt đầu phiên làm việc. Ứng dụng sẽ không lưu trữ API Key của bạn",
|
||||
"title": "Sử dụng thông tin xác thực tùy chỉnh của Google"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "Nhập Groq API Key của bạn để bắt đầu phiên làm việc. Ứng dụng sẽ không lưu trữ API Key của bạn",
|
||||
"title": "Sử dụng Groq API Key tùy chỉnh"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "Nhập Mistral AI API Key của bạn để bắt đầu phiên làm việc. Ứng dụng sẽ không lưu trữ API Key của bạn",
|
||||
"title": "Sử dụng Mistral AI API Key tùy chỉnh"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "Nhập API Key từ Groq",
|
||||
"placeholder": "Groq API Key",
|
||||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "Ollama",
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@
|
|||
"PerplexityBizError": "请求 Perplexity AI 服务出错,请根据以下信息排查或重试",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API Key 不正确或为空,请检查 Anthropic API Key 后重试",
|
||||
"AnthropicBizError": "请求 Anthropic AI 服务出错,请根据以下信息排查或重试",
|
||||
"InvalidGroqAPIKey": "Groq API Key 不正确或为空,请检查 Groq API Key 后重试",
|
||||
"GroqBizError": "请求 Groq 服务出错,请根据以下信息排查或重试",
|
||||
"InvalidOllamaArgs": "Ollama 配置不正确,请检查 Ollama 配置后重试",
|
||||
"OllamaBizError": "请求 Ollama 服务出错,请根据以下信息排查或重试",
|
||||
"OllamaServiceUnavailable": "未检测到 Ollama 服务,请检查是否正常启动",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "输入你的 Google API Key 即可开始会话。应用不会记录你的 API Key",
|
||||
"title": "使用自定义 Google API Key"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "输入你的 Groq API Key 即可开始会话。应用不会记录你的 API Key",
|
||||
"title": "使用自定义 Groq API Key"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "输入你的 Mistral AI API Key 即可开始会话。应用不会记录你的 API Key",
|
||||
"title": "使用自定义 Mistral AI API Key"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "填入来自 Groq 的 API Key",
|
||||
"placeholder": "Groq API Key",
|
||||
"title": "API Key"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
"azure": "Azure",
|
||||
"bedrock": "AWS Bedrock",
|
||||
"google": "Google",
|
||||
"groq": "Groq",
|
||||
"mistral": "Mistral AI",
|
||||
"moonshot": "Moonshot AI",
|
||||
"ollama": "奧拉馬",
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
"AzureBizError": "請求 Azure AI 服務出錯,請根據以下信息排查或重試",
|
||||
"BedrockBizError": "請求 Bedrock 服務出錯,請根據以下信息排查或重試",
|
||||
"GoogleBizError": "請求 Google 服務出錯,請根據以下信息排查或重試",
|
||||
"GroqBizError": "請求 Groq 服務出錯,請根據以下信息排查或重試",
|
||||
"InvalidAccessCode": "密碼不正確或為空,請輸入正確的訪問密碼,或添加自定義 API 金鑰",
|
||||
"InvalidAnthropicAPIKey": "Anthropic API 金鑰不正確或為空,請檢查 Anthropic API 金鑰後重試",
|
||||
"InvalidAzureAPIKey": "Azure API Key 不正確或為空,請檢查 Azure API Key 後重試",
|
||||
"InvalidBedrockCredentials": "Bedrock 驗證未通過,請檢查 AccessKeyId/SecretAccessKey 後重試",
|
||||
"InvalidGoogleAPIKey": "Google API Key 不正確或為空,請檢查 Google API Key 後重試",
|
||||
"InvalidGroqAPIKey": "Groq API 金鑰不正確或為空,請檢查 Groq API 金鑰後重試",
|
||||
"InvalidMistralAPIKey": "Mistral AI API Key 不正確或為空,請檢查 Mistral API Key 後重試",
|
||||
"InvalidMoonshotAPIKey": "Moonshot AI API 金鑰不正確或為空,請檢查 Moonshot API 金鑰後重試",
|
||||
"InvalidOllamaArgs": "Ollama 配置不正確,請檢查 Ollama 配置後重試",
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
"description": "輸入你的 Google API Key 即可開始會話。應用不會記錄你的 API Key",
|
||||
"title": "使用自定義 Google API Key"
|
||||
},
|
||||
"Groq": {
|
||||
"description": "輸入你的 Groq API 金鑰即可開始會話。應用不會記錄你的 API 金鑰",
|
||||
"title": "使用自定義 Groq API 金鑰"
|
||||
},
|
||||
"Mistral": {
|
||||
"description": "輸入你的 Mistral AI API Key 即可開始會話。應用不會記錄你的 API Key",
|
||||
"title": "使用自定義 Mistral AI API Key"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@
|
|||
"title": "API 金鑰"
|
||||
}
|
||||
},
|
||||
"Groq": {
|
||||
"title": "Groq",
|
||||
"token": {
|
||||
"desc": "填入來自 Groq 的 API 金鑰",
|
||||
"placeholder": "Groq API 金鑰",
|
||||
"title": "API 金鑰"
|
||||
}
|
||||
},
|
||||
"Mistral": {
|
||||
"title": "Mistral AI",
|
||||
"token": {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import {
|
|||
LobeAzureOpenAI,
|
||||
LobeBedrockAI,
|
||||
LobeGoogleAI,
|
||||
LobeGroq,
|
||||
LobeMistralAI,
|
||||
LobeMoonshotAI,
|
||||
LobeOllamaAI,
|
||||
|
|
@ -162,11 +163,16 @@ class AgentRuntime {
|
|||
runtimeModel = this.initAnthropic(payload);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case ModelProvider.Mistral: {
|
||||
runtimeModel = this.initMistral(payload);
|
||||
break;
|
||||
}
|
||||
|
||||
case ModelProvider.Groq: {
|
||||
runtimeModel = this.initGroq(payload);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return new AgentRuntime(runtimeModel);
|
||||
|
|
@ -261,13 +267,20 @@ class AgentRuntime {
|
|||
const baseURL = payload?.endpoint || ANTHROPIC_PROXY_URL;
|
||||
return new LobeAnthropicAI({ apiKey, baseURL });
|
||||
}
|
||||
|
||||
|
||||
private static initMistral(payload: JWTPayload) {
|
||||
const { MISTRAL_API_KEY } = getServerConfig();
|
||||
const apiKey = apiKeyManager.pick(payload?.apiKey || MISTRAL_API_KEY);
|
||||
|
||||
return new LobeMistralAI({ apiKey });
|
||||
}
|
||||
|
||||
private static initGroq(payload: JWTPayload) {
|
||||
const { GROQ_API_KEY } = getServerConfig();
|
||||
const apiKey = apiKeyManager.pick(payload?.apiKey || GROQ_API_KEY);
|
||||
|
||||
return new LobeGroq({ apiKey });
|
||||
}
|
||||
}
|
||||
|
||||
export default AgentRuntime;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export const GET = async () => {
|
|||
ENABLED_ZHIPU,
|
||||
ENABLED_AWS_BEDROCK,
|
||||
ENABLED_GOOGLE,
|
||||
ENABLED_GROQ,
|
||||
ENABLE_OAUTH_SSO,
|
||||
ENABLE_OLLAMA,
|
||||
ENABLED_PERPLEXITY,
|
||||
|
|
@ -36,6 +37,7 @@ export const GET = async () => {
|
|||
anthropic: { enabled: ENABLED_ANTHROPIC },
|
||||
bedrock: { enabled: ENABLED_AWS_BEDROCK },
|
||||
google: { enabled: ENABLED_GOOGLE },
|
||||
groq: { enabled: ENABLED_GROQ },
|
||||
mistral: { enabled: ENABLED_MISTRAL },
|
||||
moonshot: { enabled: ENABLED_MOONSHOT },
|
||||
ollama: { customModelName: OLLAMA_CUSTOM_MODELS, enabled: ENABLE_OLLAMA },
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ const getStatus = (errorType: ILobeAgentRuntimeErrorType | ErrorType) => {
|
|||
case AgentRuntimeErrorType.MistralBizError: {
|
||||
return 481;
|
||||
}
|
||||
case AgentRuntimeErrorType.GroqBizError: {
|
||||
return 482;
|
||||
}
|
||||
}
|
||||
return errorType as number;
|
||||
};
|
||||
|
|
|
|||
47
src/app/settings/llm/Groq/index.tsx
Normal file
47
src/app/settings/llm/Groq/index.tsx
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { Groq } from '@lobehub/icons';
|
||||
import { Input } from 'antd';
|
||||
import { useTheme } from 'antd-style';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { ModelProvider } from '@/libs/agent-runtime';
|
||||
|
||||
import Checker from '../components/Checker';
|
||||
import ProviderConfig from '../components/ProviderConfig';
|
||||
import { LLMProviderApiTokenKey, LLMProviderConfigKey } from '../const';
|
||||
|
||||
const providerKey = 'groq';
|
||||
|
||||
const GroqProvider = memo(() => {
|
||||
const { t } = useTranslation('setting');
|
||||
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<ProviderConfig
|
||||
configItems={[
|
||||
{
|
||||
children: (
|
||||
<Input.Password
|
||||
autoComplete={'new-password'}
|
||||
placeholder={t('llm.Groq.token.placeholder')}
|
||||
/>
|
||||
),
|
||||
desc: t('llm.Groq.token.desc'),
|
||||
label: t('llm.Groq.token.title'),
|
||||
name: [LLMProviderConfigKey, providerKey, LLMProviderApiTokenKey],
|
||||
},
|
||||
{
|
||||
children: <Checker model={'gemma-7b-it'} provider={ModelProvider.Groq} />,
|
||||
desc: t('llm.checker.desc'),
|
||||
label: t('llm.checker.title'),
|
||||
minWidth: '100%',
|
||||
},
|
||||
]}
|
||||
provider={providerKey}
|
||||
title={<Groq.Text color={theme.isDarkMode ? theme.colorText : Groq.colorPrimary} size={24} />}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
export default GroqProvider;
|
||||
|
|
@ -11,6 +11,7 @@ import Footer from '../features/Footer';
|
|||
import Anthropic from './Anthropic';
|
||||
import Bedrock from './Bedrock';
|
||||
import Google from './Google';
|
||||
import Groq from './Groq';
|
||||
import Mistral from './Mistral';
|
||||
import Moonshot from './Moonshot';
|
||||
import Ollama from './Ollama';
|
||||
|
|
@ -29,6 +30,7 @@ export default memo<{ showOllama: boolean }>(({ showOllama }) => {
|
|||
{showOllama && <Ollama />}
|
||||
<Anthropic />
|
||||
<Google />
|
||||
<Groq />
|
||||
<Bedrock />
|
||||
<Perplexity />
|
||||
<Mistral />
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import {
|
|||
Azure,
|
||||
Bedrock,
|
||||
Google,
|
||||
Groq,
|
||||
Mistral,
|
||||
Moonshot,
|
||||
Ollama,
|
||||
|
|
@ -69,6 +70,10 @@ const ModelProviderIcon = memo<ModelProviderIconProps>(({ provider }) => {
|
|||
return <Anthropic size={20} />;
|
||||
}
|
||||
|
||||
case ModelProvider.Groq: {
|
||||
return <Groq size={20} />;
|
||||
}
|
||||
|
||||
default: {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
24
src/config/modelProviders/groq.ts
Normal file
24
src/config/modelProviders/groq.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { ModelProviderCard } from '@/types/llm';
|
||||
|
||||
const Groq: ModelProviderCard = {
|
||||
chatModels: [
|
||||
{
|
||||
displayName: 'Mixtral-8x7b-Instruct-v0.1',
|
||||
id: 'mixtral-8x7b-32768',
|
||||
tokens: 32_768,
|
||||
},
|
||||
{
|
||||
displayName: 'Gemma-7b-it',
|
||||
id: 'gemma-7b-it',
|
||||
tokens: 8192,
|
||||
},
|
||||
{
|
||||
displayName: 'LLaMA2-70b-chat',
|
||||
id: 'llama2-70b-4096',
|
||||
tokens: 4096,
|
||||
},
|
||||
],
|
||||
id: 'groq',
|
||||
};
|
||||
|
||||
export default Groq;
|
||||
|
|
@ -3,6 +3,7 @@ import { ChatModelCard } from '@/types/llm';
|
|||
import AnthropicProvider from './anthropic';
|
||||
import BedrockProvider from './bedrock';
|
||||
import GoogleProvider from './google';
|
||||
import GroqProvider from './groq';
|
||||
import MistralProvider from './mistral';
|
||||
import MoonshotProvider from './moonshot';
|
||||
import OllamaProvider from './ollama';
|
||||
|
|
@ -15,6 +16,7 @@ export const LOBE_DEFAULT_MODEL_LIST: ChatModelCard[] = [
|
|||
ZhiPuProvider.chatModels,
|
||||
BedrockProvider.chatModels,
|
||||
GoogleProvider.chatModels,
|
||||
GroqProvider.chatModels,
|
||||
MistralProvider.chatModels,
|
||||
MoonshotProvider.chatModels,
|
||||
OllamaProvider.chatModels,
|
||||
|
|
@ -25,6 +27,7 @@ export const LOBE_DEFAULT_MODEL_LIST: ChatModelCard[] = [
|
|||
export { default as AnthropicProvider } from './anthropic';
|
||||
export { default as BedrockProvider } from './bedrock';
|
||||
export { default as GoogleProvider } from './google';
|
||||
export { default as GroqProvider } from './groq';
|
||||
export { default as MistralProvider } from './mistral';
|
||||
export { default as MoonshotProvider } from './moonshot';
|
||||
export { default as OllamaProvider } from './ollama';
|
||||
|
|
|
|||
|
|
@ -36,10 +36,13 @@ declare global {
|
|||
// Anthropic Provider
|
||||
ANTHROPIC_API_KEY?: string;
|
||||
ANTHROPIC_PROXY_URL?: string;
|
||||
|
||||
|
||||
// Mistral Provider
|
||||
MISTRAL_API_KEY?: string;
|
||||
|
||||
// Groq Provider
|
||||
GROQ_API_KEY?: string;
|
||||
|
||||
// AWS Credentials
|
||||
AWS_REGION?: string;
|
||||
AWS_ACCESS_KEY_ID?: string;
|
||||
|
|
@ -67,9 +70,11 @@ export const getProviderConfig = () => {
|
|||
const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY || '';
|
||||
|
||||
const ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY || '';
|
||||
|
||||
|
||||
const MISTRAL_API_KEY = process.env.MISTRAL_API_KEY || '';
|
||||
|
||||
const GROQ_API_KEY = process.env.GROQ_API_KEY || '';
|
||||
|
||||
// region format: iad1,sfo1
|
||||
let regions: string[] = [];
|
||||
if (process.env.OPENAI_FUNCTION_REGIONS) {
|
||||
|
|
@ -97,7 +102,7 @@ export const getProviderConfig = () => {
|
|||
ENABLED_ANTHROPIC: !!ANTHROPIC_API_KEY,
|
||||
ANTHROPIC_API_KEY,
|
||||
ANTHROPIC_PROXY_URL: process.env.ANTHROPIC_PROXY_URL,
|
||||
|
||||
|
||||
ENABLED_MISTRAL: !!MISTRAL_API_KEY,
|
||||
MISTRAL_API_KEY,
|
||||
|
||||
|
|
@ -105,6 +110,9 @@ export const getProviderConfig = () => {
|
|||
MOONSHOT_API_KEY,
|
||||
MOONSHOT_PROXY_URL: process.env.MOONSHOT_PROXY_URL,
|
||||
|
||||
ENABLED_GROQ: !!GROQ_API_KEY,
|
||||
GROQ_API_KEY,
|
||||
|
||||
ENABLED_AWS_BEDROCK: !!AWS_ACCESS_KEY_ID,
|
||||
AWS_REGION: process.env.AWS_REGION,
|
||||
AWS_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID,
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ export const DEFAULT_LLM_CONFIG: GlobalLLMConfig = {
|
|||
apiKey: '',
|
||||
enabled: false,
|
||||
},
|
||||
groq: {
|
||||
apiKey: '',
|
||||
enabled: false,
|
||||
},
|
||||
mistral: {
|
||||
apiKey: '',
|
||||
enabled: false,
|
||||
|
|
|
|||
60
src/features/Conversation/Error/APIKeyForm/Groq.tsx
Normal file
60
src/features/Conversation/Error/APIKeyForm/Groq.tsx
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import { Groq } from '@lobehub/icons';
|
||||
import { Input } from 'antd';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { ModelProvider } from '@/libs/agent-runtime';
|
||||
import { useGlobalStore } from '@/store/global';
|
||||
import { modelProviderSelectors } from '@/store/global/selectors';
|
||||
|
||||
import { FormAction } from '../style';
|
||||
|
||||
const GroqForm = memo(() => {
|
||||
const { t } = useTranslation('error');
|
||||
// const [showProxy, setShow] = useState(false);
|
||||
|
||||
const [apiKey, setConfig] = useGlobalStore((s) => [
|
||||
modelProviderSelectors.groqAPIKey(s),
|
||||
s.setModelProviderConfig,
|
||||
]);
|
||||
|
||||
return (
|
||||
<FormAction
|
||||
avatar={<Groq size={56} />}
|
||||
description={t('unlock.apikey.Groq.description')}
|
||||
title={t('unlock.apikey.Groq.title')}
|
||||
>
|
||||
<Input.Password
|
||||
autoComplete={'new-password'}
|
||||
onChange={(e) => {
|
||||
setConfig(ModelProvider.Groq, { apiKey: e.target.value });
|
||||
}}
|
||||
placeholder={'*********************************'}
|
||||
type={'block'}
|
||||
value={apiKey}
|
||||
/>
|
||||
{/*{showProxy ? (*/}
|
||||
{/* <Input*/}
|
||||
{/* onChange={(e) => {*/}
|
||||
{/* setConfig({ endpoint: e.target.value });*/}
|
||||
{/* }}*/}
|
||||
{/* placeholder={'https://api.openai.com/v1'}*/}
|
||||
{/* type={'block'}*/}
|
||||
{/* value={proxyUrl}*/}
|
||||
{/* />*/}
|
||||
{/*) : (*/}
|
||||
{/* <Button*/}
|
||||
{/* icon={<Icon icon={Network} />}*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* setShow(true);*/}
|
||||
{/* }}*/}
|
||||
{/* type={'text'}*/}
|
||||
{/* >*/}
|
||||
{/* {t('unlock.apikey.addProxyUrl')}*/}
|
||||
{/* </Button>*/}
|
||||
{/*)}*/}
|
||||
</FormAction>
|
||||
);
|
||||
});
|
||||
|
||||
export default GroqForm;
|
||||
|
|
@ -9,6 +9,7 @@ import { useChatStore } from '@/store/chat';
|
|||
import AnthropicForm from './Anthropic';
|
||||
import BedrockForm from './Bedrock';
|
||||
import GoogleForm from './Google';
|
||||
import GroqForm from './Groq';
|
||||
import MistralForm from './Mistral';
|
||||
import MoonshotForm from './Moonshot';
|
||||
import OpenAIForm from './OpenAI';
|
||||
|
|
@ -55,6 +56,10 @@ const APIKeyForm = memo<APIKeyFormProps>(({ id, provider }) => {
|
|||
return <AnthropicForm />;
|
||||
}
|
||||
|
||||
case ModelProvider.Groq: {
|
||||
return <GroqForm />;
|
||||
}
|
||||
|
||||
default:
|
||||
case ModelProvider.OpenAI: {
|
||||
return <OpenAIForm />;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ const ErrorMessageExtra = memo<{ data: ChatMessage }>(({ data }) => {
|
|||
case AgentRuntimeErrorType.InvalidGoogleAPIKey:
|
||||
case AgentRuntimeErrorType.InvalidPerplexityAPIKey:
|
||||
case AgentRuntimeErrorType.InvalidAnthropicAPIKey:
|
||||
case AgentRuntimeErrorType.InvalidGroqAPIKey:
|
||||
case AgentRuntimeErrorType.NoOpenAIAPIKey: {
|
||||
return <InvalidAPIKey id={data.id} provider={data.error?.body?.provider} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,13 +81,14 @@ const Item = memo<ChatListItemProps>(({ index, id }) => {
|
|||
[item?.role],
|
||||
);
|
||||
|
||||
const { t: errorT } = useTranslation('error');
|
||||
const error = useMemo<AlertProps | undefined>(() => {
|
||||
if (!item?.error) return;
|
||||
const messageError = item.error;
|
||||
|
||||
const alertConfig = getErrorAlertConfig(messageError.type);
|
||||
|
||||
return { message: t(`response.${messageError.type}` as any, { ns: 'error' }), ...alertConfig };
|
||||
return { message: errorT(`response.${messageError.type}` as any), ...alertConfig };
|
||||
}, [item?.error]);
|
||||
|
||||
const enableHistoryDivider = useSessionStore((s) => {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ export const AgentRuntimeErrorType = {
|
|||
|
||||
InvalidAnthropicAPIKey: 'InvalidAnthropicAPIKey',
|
||||
AnthropicBizError: 'AnthropicBizError',
|
||||
|
||||
InvalidGroqAPIKey: 'InvalidGroqAPIKey',
|
||||
GroqBizError: 'GroqBizError',
|
||||
} as const;
|
||||
|
||||
export type ILobeAgentRuntimeErrorType =
|
||||
|
|
|
|||
78
src/libs/agent-runtime/groq/index.ts
Normal file
78
src/libs/agent-runtime/groq/index.ts
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
import { OpenAIStream, StreamingTextResponse } from 'ai';
|
||||
import OpenAI, { ClientOptions } from 'openai';
|
||||
|
||||
import { LobeRuntimeAI } from '../BaseAI';
|
||||
import { AgentRuntimeErrorType } from '../error';
|
||||
import { ChatCompetitionOptions, ChatStreamPayload, ModelProvider } from '../types';
|
||||
import { AgentRuntimeError } from '../utils/createError';
|
||||
import { debugStream } from '../utils/debugStream';
|
||||
import { desensitizeUrl } from '../utils/desensitizeUrl';
|
||||
import { handleOpenAIError } from '../utils/handleOpenAIError';
|
||||
|
||||
const DEFAULT_BASE_URL = 'https://api.groq.com/openai/v1';
|
||||
|
||||
export class LobeGroq implements LobeRuntimeAI {
|
||||
private client: OpenAI;
|
||||
|
||||
baseURL: string;
|
||||
|
||||
constructor({ apiKey, baseURL = DEFAULT_BASE_URL, ...res }: ClientOptions) {
|
||||
if (!apiKey) throw AgentRuntimeError.createError(AgentRuntimeErrorType.InvalidGroqAPIKey);
|
||||
|
||||
this.client = new OpenAI({ apiKey, baseURL, ...res });
|
||||
this.baseURL = this.client.baseURL;
|
||||
}
|
||||
|
||||
async chat(payload: ChatStreamPayload, options?: ChatCompetitionOptions) {
|
||||
try {
|
||||
const response = await this.client.chat.completions.create(
|
||||
payload as unknown as OpenAI.ChatCompletionCreateParamsStreaming,
|
||||
);
|
||||
const [prod, debug] = response.tee();
|
||||
|
||||
if (process.env.DEBUG_GROQ_CHAT_COMPLETION === '1') {
|
||||
debugStream(debug.toReadableStream()).catch(console.error);
|
||||
}
|
||||
|
||||
return new StreamingTextResponse(OpenAIStream(prod, options?.callback), {
|
||||
headers: options?.headers,
|
||||
});
|
||||
} catch (error) {
|
||||
let desensitizedEndpoint = this.baseURL;
|
||||
|
||||
if (this.baseURL !== DEFAULT_BASE_URL) {
|
||||
desensitizedEndpoint = desensitizeUrl(this.baseURL);
|
||||
}
|
||||
|
||||
if ('status' in (error as any)) {
|
||||
switch ((error as Response).status) {
|
||||
case 401: {
|
||||
throw AgentRuntimeError.chat({
|
||||
endpoint: desensitizedEndpoint,
|
||||
error: error as any,
|
||||
errorType: AgentRuntimeErrorType.InvalidGroqAPIKey,
|
||||
provider: ModelProvider.Groq,
|
||||
});
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { errorResult, RuntimeError } = handleOpenAIError(error);
|
||||
|
||||
const errorType = RuntimeError || AgentRuntimeErrorType.GroqBizError;
|
||||
|
||||
throw AgentRuntimeError.chat({
|
||||
endpoint: desensitizedEndpoint,
|
||||
error: errorResult,
|
||||
errorType,
|
||||
provider: ModelProvider.Groq,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default LobeGroq;
|
||||
|
|
@ -4,6 +4,7 @@ export * from './BaseAI';
|
|||
export { LobeBedrockAI } from './bedrock';
|
||||
export * from './error';
|
||||
export { LobeGoogleAI } from './google';
|
||||
export { LobeGroq } from './groq';
|
||||
export { LobeMistralAI } from './mistral';
|
||||
export { LobeMoonshotAI } from './moonshot';
|
||||
export { LobeOllamaAI } from './ollama';
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export enum ModelProvider {
|
|||
Bedrock = 'bedrock',
|
||||
ChatGLM = 'chatglm',
|
||||
Google = 'google',
|
||||
Groq = 'groq',
|
||||
Mistral = 'mistral',
|
||||
Moonshot = 'moonshot',
|
||||
Ollama = 'ollama',
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ export default {
|
|||
azure: 'Azure',
|
||||
bedrock: 'AWS Bedrock',
|
||||
google: 'Google',
|
||||
groq: 'Groq',
|
||||
mistral: 'Mistral AI',
|
||||
moonshot: 'Moonshot AI',
|
||||
ollama: 'Ollama',
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ export default {
|
|||
InvalidAnthropicAPIKey: 'Anthropic API Key 不正确或为空,请检查 Anthropic API Key 后重试',
|
||||
AnthropicBizError: '请求 Anthropic AI 服务出错,请根据以下信息排查或重试',
|
||||
|
||||
InvalidGroqAPIKey: 'Groq API Key 不正确或为空,请检查 Groq API Key 后重试',
|
||||
GroqBizError: '请求 Groq 服务出错,请根据以下信息排查或重试',
|
||||
|
||||
InvalidOllamaArgs: 'Ollama 配置不正确,请检查 Ollama 配置后重试',
|
||||
OllamaBizError: '请求 Ollama 服务出错,请根据以下信息排查或重试',
|
||||
OllamaServiceUnavailable: '未检测到 Ollama 服务,请检查是否正常启动',
|
||||
|
|
@ -111,6 +114,10 @@ export default {
|
|||
description: '输入你的 Google API Key 即可开始会话。应用不会记录你的 API Key',
|
||||
title: '使用自定义 Google API Key',
|
||||
},
|
||||
Groq: {
|
||||
description: '输入你的 Groq API Key 即可开始会话。应用不会记录你的 API Key',
|
||||
title: '使用自定义 Groq API Key',
|
||||
},
|
||||
Mistral: {
|
||||
description: '输入你的 Mistral AI API Key 即可开始会话。应用不会记录你的 API Key',
|
||||
title: '使用自定义 Mistral AI API Key',
|
||||
|
|
|
|||
|
|
@ -100,6 +100,14 @@ export default {
|
|||
title: 'API Key',
|
||||
},
|
||||
},
|
||||
Groq: {
|
||||
title: 'Groq',
|
||||
token: {
|
||||
desc: '填入来自 Groq 的 API Key',
|
||||
placeholder: 'Groq API Key',
|
||||
title: 'API Key',
|
||||
},
|
||||
},
|
||||
Mistral: {
|
||||
title: 'Mistral AI',
|
||||
token: {
|
||||
|
|
|
|||
|
|
@ -57,11 +57,15 @@ export const getProviderAuthPayload = (provider: string) => {
|
|||
const endpoint = modelProviderSelectors.anthropicProxyUrl(useGlobalStore.getState());
|
||||
return { apiKey, endpoint };
|
||||
}
|
||||
|
||||
|
||||
case ModelProvider.Mistral: {
|
||||
return { apiKey: modelProviderSelectors.mistralAPIKey(useGlobalStore.getState()) };
|
||||
}
|
||||
|
||||
case ModelProvider.Groq: {
|
||||
return { apiKey: modelProviderSelectors.groqAPIKey(useGlobalStore.getState()) };
|
||||
}
|
||||
|
||||
default:
|
||||
case ModelProvider.OpenAI: {
|
||||
const openai = modelProviderSelectors.openAIConfig(useGlobalStore.getState());
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import {
|
|||
AnthropicProvider,
|
||||
BedrockProvider,
|
||||
GoogleProvider,
|
||||
GroqProvider,
|
||||
LOBE_DEFAULT_MODEL_LIST,
|
||||
MistralProvider,
|
||||
MoonshotProvider,
|
||||
|
|
@ -58,6 +59,9 @@ const enableAnthropic = (s: GlobalStore) => modelProvider(s).anthropic.enabled;
|
|||
const anthropicAPIKey = (s: GlobalStore) => modelProvider(s).anthropic.apiKey;
|
||||
const anthropicProxyUrl = (s: GlobalStore) => modelProvider(s).anthropic.endpoint;
|
||||
|
||||
const enableGroq = (s: GlobalStore) => modelProvider(s).groq.enabled;
|
||||
const groqAPIKey = (s: GlobalStore) => modelProvider(s).groq.apiKey;
|
||||
|
||||
// const azureModelList = (s: GlobalStore): ModelProviderCard => {
|
||||
// const azure = azureConfig(s);
|
||||
// return {
|
||||
|
|
@ -143,14 +147,15 @@ const modelSelectList = (s: GlobalStore): ModelProviderCard[] => {
|
|||
chatModels: openaiChatModels,
|
||||
},
|
||||
// { ...azureModelList(s), enabled: enableAzure(s) },
|
||||
{ ...ZhiPuProvider, enabled: enableZhipu(s) },
|
||||
{ ...MoonshotProvider, enabled: enableMoonshot(s) },
|
||||
{ ...OllamaProvider, chatModels: ollamaChatModels, enabled: enableOllama(s) },
|
||||
{ ...AnthropicProvider, enabled: enableAnthropic(s) },
|
||||
{ ...GoogleProvider, enabled: enableGoogle(s) },
|
||||
{ ...BedrockProvider, enabled: enableBedrock(s) },
|
||||
{ ...OllamaProvider, chatModels: ollamaChatModels, enabled: enableOllama(s) },
|
||||
{ ...PerplexityProvider, enabled: enablePerplexity(s) },
|
||||
{ ...AnthropicProvider, enabled: enableAnthropic(s) },
|
||||
{ ...MistralProvider, enabled: enableMistral(s) },
|
||||
{ ...GroqProvider, enabled: enableGroq(s) },
|
||||
{ ...ZhiPuProvider, enabled: enableZhipu(s) },
|
||||
{ ...MoonshotProvider, enabled: enableMoonshot(s) },
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -229,8 +234,12 @@ export const modelProviderSelectors = {
|
|||
enableAnthropic,
|
||||
anthropicAPIKey,
|
||||
anthropicProxyUrl,
|
||||
|
||||
|
||||
// Mistral
|
||||
enableMistral,
|
||||
mistralAPIKey,
|
||||
|
||||
// Groq
|
||||
enableGroq,
|
||||
groqAPIKey,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -71,11 +71,17 @@ export interface MistralConfig {
|
|||
enabled: boolean;
|
||||
}
|
||||
|
||||
export interface GroqConfig {
|
||||
apiKey?: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export interface GlobalLLMConfig {
|
||||
anthropic: AnthropicConfig;
|
||||
azure: AzureOpenAIConfig;
|
||||
bedrock: AWSBedrockConfig;
|
||||
google: GoogleConfig;
|
||||
groq: GroqConfig;
|
||||
mistral: MistralConfig;
|
||||
moonshot: MoonshotConfig;
|
||||
ollama: OllamaConfig;
|
||||
|
|
|
|||
Loading…
Reference in a new issue