@lobehub/chat 0.144.0 → 0.145.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +6 -0
- package/CHANGELOG.md +50 -0
- package/Dockerfile +3 -0
- package/docs/self-hosting/environment-variables/model-provider.mdx +9 -0
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +9 -0
- package/locales/ar/common.json +1 -0
- package/locales/ar/error.json +6 -0
- package/locales/ar/setting.json +16 -0
- package/locales/bg-BG/chat.json +1 -1
- package/locales/bg-BG/error.json +1 -1
- package/locales/bg-BG/market.json +1 -1
- package/locales/bg-BG/migration.json +1 -1
- package/locales/bg-BG/plugin.json +1 -1
- package/locales/bg-BG/setting.json +1 -1
- package/locales/bg-BG/tool.json +1 -1
- package/locales/bg-BG/welcome.json +1 -1
- package/locales/de-DE/common.json +1 -0
- package/locales/de-DE/error.json +6 -0
- package/locales/de-DE/setting.json +16 -0
- package/locales/en-US/common.json +1 -0
- package/locales/en-US/error.json +6 -0
- package/locales/en-US/setting.json +16 -0
- package/locales/es-ES/common.json +1 -0
- package/locales/es-ES/error.json +6 -0
- package/locales/es-ES/setting.json +16 -0
- package/locales/fr-FR/common.json +1 -0
- package/locales/fr-FR/error.json +6 -0
- package/locales/fr-FR/setting.json +16 -0
- package/locales/it-IT/common.json +1 -0
- package/locales/it-IT/error.json +6 -0
- package/locales/it-IT/setting.json +16 -0
- package/locales/ja-JP/common.json +1 -0
- package/locales/ja-JP/error.json +6 -0
- package/locales/ja-JP/setting.json +16 -0
- package/locales/ko-KR/common.json +1 -0
- package/locales/ko-KR/error.json +2 -0
- package/locales/ko-KR/setting.json +16 -0
- package/locales/nl-NL/common.json +1 -0
- package/locales/nl-NL/error.json +6 -0
- package/locales/nl-NL/setting.json +16 -0
- package/locales/pl-PL/common.json +1 -0
- package/locales/pl-PL/error.json +6 -0
- package/locales/pl-PL/setting.json +23 -7
- package/locales/pt-BR/common.json +1 -0
- package/locales/pt-BR/error.json +6 -0
- package/locales/pt-BR/setting.json +16 -0
- package/locales/ru-RU/common.json +1 -0
- package/locales/ru-RU/error.json +6 -0
- package/locales/ru-RU/setting.json +16 -0
- package/locales/tr-TR/common.json +1 -0
- package/locales/tr-TR/error.json +6 -0
- package/locales/tr-TR/setting.json +23 -7
- package/locales/vi-VN/common.json +1 -0
- package/locales/vi-VN/error.json +6 -0
- package/locales/vi-VN/setting.json +16 -0
- package/locales/zh-CN/common.json +1 -0
- package/locales/zh-CN/error.json +6 -0
- package/locales/zh-CN/setting.json +16 -0
- package/locales/zh-TW/common.json +1 -0
- package/locales/zh-TW/error.json +6 -0
- package/locales/zh-TW/setting.json +16 -0
- package/package.json +1 -1
- package/src/app/api/chat/[provider]/agentRuntime.test.ts +26 -0
- package/src/app/api/chat/[provider]/agentRuntime.ts +13 -1
- package/src/app/api/config/route.ts +2 -0
- package/src/app/api/errorResponse.test.ts +5 -0
- package/src/app/api/errorResponse.ts +3 -0
- package/src/app/settings/llm/Google/index.tsx +2 -2
- package/src/app/settings/llm/TogetherAI/index.tsx +66 -0
- package/src/app/settings/llm/index.tsx +2 -0
- package/src/components/ModelProviderIcon/index.tsx +5 -0
- package/src/config/modelProviders/index.ts +3 -0
- package/src/config/modelProviders/ollama.ts +3 -3
- package/src/config/modelProviders/togetherai.ts +86 -0
- package/src/config/modelProviders/zeroone.ts +2 -1
- package/src/config/server/provider.ts +8 -0
- package/src/const/settings.ts +4 -0
- package/src/features/Conversation/Error/APIKeyForm/TogetherAI.tsx +40 -0
- package/src/features/Conversation/Error/APIKeyForm/index.tsx +5 -0
- package/src/features/Conversation/Error/index.tsx +1 -0
- package/src/libs/agent-runtime/error.ts +3 -0
- package/src/libs/agent-runtime/index.ts +1 -0
- package/src/libs/agent-runtime/ollama/index.test.ts +46 -1
- package/src/libs/agent-runtime/ollama/index.ts +40 -0
- package/src/libs/agent-runtime/togetherai/index.test.ts +347 -0
- package/src/libs/agent-runtime/togetherai/index.ts +86 -0
- package/src/libs/agent-runtime/types/chat.ts +7 -0
- package/src/libs/agent-runtime/types/type.ts +1 -0
- package/src/libs/agent-runtime/zeroone/index.ts +1 -1
- package/src/locales/default/common.ts +1 -0
- package/src/locales/default/error.ts +7 -0
- package/src/locales/default/setting.ts +17 -1
- package/src/services/_auth.test.ts +10 -0
- package/src/services/_auth.ts +4 -0
- package/src/store/global/slices/settings/selectors/modelProvider.test.ts +2 -2
- package/src/store/global/slices/settings/selectors/modelProvider.ts +26 -6
- package/src/types/settings/modelProvider.ts +7 -0
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "API 키"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "프록시 주소가 올바르게 입력되었는지 확인합니다."
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "사용자 정의 모델을 추가하고, 여러 모델은 쉼표(,)로 구분합니다",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "사용자 정의 모델 이름"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "TogetherAI AI에서 받은 API 키를 입력합니다.",
|
|
208
|
+
"placeholder": "TogetherAI AI API 키",
|
|
209
|
+
"title": "API 키"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity",
|
|
198
214
|
"token": {
|
package/locales/nl-NL/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"InvalidMoonshotAPIKey": "Moonshot AI API密钥不正确或为空,请检查Moonshot API密钥后重试",
|
|
50
50
|
"InvalidOllamaArgs": "Ollama-configuratie is onjuist, controleer de Ollama-configuratie en probeer het opnieuw",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "OpenRouter API Key is onjuist of leeg. Controleer de OpenRouter API Key en probeer het opnieuw.",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API Key is onjuist of leeg. Controleer de TogetherAI API Key en probeer het opnieuw.",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Perplexity API Key is onjuist of leeg. Controleer de Perplexity API Key en probeer het opnieuw.",
|
|
53
54
|
"InvalidZeroOneAPIKey": "零一万物 API Key 不正确或为空,请检查零一万物 API Key 后重试",
|
|
54
55
|
"InvalidZhipuAPIKey": "Incorrect or empty Zhipu API Key, please check the Zhipu API Key and retry",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "Ollama 服务不可用,请检查是否已正常启动",
|
|
61
62
|
"OpenAIBizError": "Fout bij het aanvragen van OpenAI-service. Controleer de onderstaande informatie voor probleemoplossing of probeer opnieuw",
|
|
62
63
|
"OpenRouterBizError": "Fout bij het aanvragen van OpenRouter AI-service. Controleer de onderstaande informatie en probeer opnieuw.",
|
|
64
|
+
"TogetherAIBizError": "Fout bij het aanvragen van TogetherAI AI-service. Controleer de onderstaande informatie en probeer opnieuw.",
|
|
63
65
|
"PerplexityBizError": "Er is een fout opgetreden bij het aanvragen van de Perplexity AI-service. Controleer de onderstaande informatie en probeer het opnieuw.",
|
|
64
66
|
"PluginApiNotFound": "Sorry, de API van de plug-inbeschrijvingslijst bestaat niet. Controleer of uw verzoeksmethode overeenkomt met de plug-inbeschrijvingslijst API",
|
|
65
67
|
"PluginApiParamsError": "Sorry, de validatie van de invoerparameters van de plug-in is mislukt. Controleer of de invoerparameters overeenkomen met de API-beschrijving",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "Voer uw OpenRouter API Key in om de sessie te starten. De app zal uw API Key niet opslaan.",
|
|
119
121
|
"title": "Gebruik aangepaste OpenRouter API Key"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "Voer uw TogetherAI API Key in om de sessie te starten. De app zal uw API Key niet opslaan.",
|
|
125
|
+
"title": "Gebruik aangepaste TogetherAI API Key"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "Voer uw eigen Perplexity API Key in om het gesprek te starten. De app zal uw API Key niet opslaan.",
|
|
123
129
|
"title": "Gebruik een aangepaste Perplexity API Key"
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "API-sleutel"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "Check of de proxy-adres correct is ingevuld"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "Voeg aangepast model toe, gebruik een komma (,) om meerdere modellen te scheiden",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "Aangepaste modelnaam"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "Voer de API-sleutel in van TogetherAI AI",
|
|
208
|
+
"placeholder": "TogetherAI AI API-sleutel",
|
|
209
|
+
"title": "API-sleutel"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity",
|
|
198
214
|
"token": {
|
package/locales/pl-PL/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"InvalidMoonshotAPIKey": "Moonshot AI API密钥不正确或为空,请检查Moonshot API密钥后重试",
|
|
50
50
|
"InvalidOllamaArgs": "Nieprawidłowa konfiguracja Ollama, sprawdź konfigurację Ollama i spróbuj ponownie",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "OpenRouter API Key jest nieprawidłowy lub pusty. Sprawdź klucz API OpenRouter i spróbuj ponownie.",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API Key jest nieprawidłowy lub pusty. Sprawdź klucz API TogetherAI i spróbuj ponownie.",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Klucz API Perplexity jest nieprawidłowy lub pusty. Sprawdź klucz API Perplexity i spróbuj ponownie.",
|
|
53
54
|
"InvalidZeroOneAPIKey": "零一万物 API Key 不正确或为空,请检查零一万物 API Key 后重试",
|
|
54
55
|
"InvalidZhipuAPIKey": "Nieprawidłowy lub pusty klucz API Zhipu, prosimy sprawdzić klucz API Zhipu i spróbować ponownie.",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "Usługa Ollama jest niedostępna. Sprawdź, czy została poprawnie uruchomiona.",
|
|
61
62
|
"OpenAIBizError": "Błąd żądania usługi OpenAI. Proszę sprawdź poniższe informacje i spróbuj ponownie",
|
|
62
63
|
"OpenRouterBizError": "Wystąpił błąd biznesowy podczas żądania usługi OpenRouter AI. Sprawdź poniższe informacje lub spróbuj ponownie.",
|
|
64
|
+
"TogetherAIBizError": "Wystąpił błąd biznesowy podczas żądania usługi TogetherAI AI. Sprawdź poniższe informacje lub spróbuj ponownie.",
|
|
63
65
|
"PerplexityBizError": "Błąd biznesowy podczas żądania usługi Perplexity AI. Sprawdź poniższe informacje lub spróbuj ponownie.",
|
|
64
66
|
"PluginApiNotFound": "Przepraszamy, w manifestach wtyczki nie istnieje to API. Proszę sprawdź, czy metoda żądania jest zgodna z API w manifestach wtyczki",
|
|
65
67
|
"PluginApiParamsError": "Przepraszamy, walidacja parametrów wejściowych żądanej wtyczki nie powiodła się. Proszę sprawdź, czy parametry wejściowe są zgodne z informacjami opisującymi API",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "Wprowadź swój klucz API OpenRouter, aby rozpocząć sesję. Aplikacja nie będzie przechowywać Twojego klucza API.",
|
|
119
121
|
"title": "Użyj niestandardowego klucza API OpenRouter"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "Wprowadź swój klucz API TogetherAI, aby rozpocząć sesję. Aplikacja nie będzie przechowywać Twojego klucza API.",
|
|
125
|
+
"title": "Użyj niestandardowego klucza API TogetherAI"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "Wprowadź swój klucz API Perplexity, aby rozpocząć sesję. Aplikacja nie będzie przechowywać Twojego klucza API.",
|
|
123
129
|
"title": "Użyj niestandardowego klucza API Perplexity"
|
|
@@ -179,18 +179,34 @@
|
|
|
179
179
|
},
|
|
180
180
|
"OpenRouter": {
|
|
181
181
|
"checker": {
|
|
182
|
-
"desc": "
|
|
182
|
+
"desc": "Sprawdź, czy adres proxy jest poprawnie wypełniony"
|
|
183
183
|
},
|
|
184
184
|
"customModelName": {
|
|
185
|
-
"desc": "
|
|
186
|
-
"placeholder": "
|
|
187
|
-
"title": "
|
|
185
|
+
"desc": "Dodaj niestandardowe modele, oddzielając je przecinkami (,)",
|
|
186
|
+
"placeholder": "model1,model2,model3",
|
|
187
|
+
"title": "Nazwa niestandardowego modelu"
|
|
188
188
|
},
|
|
189
189
|
"title": "OpenRouter",
|
|
190
190
|
"token": {
|
|
191
|
-
"desc": "
|
|
192
|
-
"placeholder": "
|
|
193
|
-
"title": "API
|
|
191
|
+
"desc": "Użyj własnego klucza API OpenRouter",
|
|
192
|
+
"placeholder": "Klucz API OpenRouter",
|
|
193
|
+
"title": "Klucz API"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "Sprawdź, czy adres proxy jest poprawnie wypełniony"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "Dodaj niestandardowe modele, oddzielając je przecinkami (,)",
|
|
202
|
+
"placeholder": "model1,model2,model3",
|
|
203
|
+
"title": "Nazwa niestandardowego modelu"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "Użyj własnego klucza API TogetherAI",
|
|
208
|
+
"placeholder": "Klucz API TogetherAI",
|
|
209
|
+
"title": "Klucz API"
|
|
194
210
|
}
|
|
195
211
|
},
|
|
196
212
|
"Perplexity": {
|
package/locales/pt-BR/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"InvalidMoonshotAPIKey": "A chave da API Moonshot AI está incorreta ou vazia. Por favor, verifique a chave da API Moonshot e tente novamente.",
|
|
50
50
|
"InvalidOllamaArgs": "Configuração Ollama inválida, verifique a configuração do Ollama e tente novamente",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "Chave da API do OpenRouter inválida ou em branco. Por favor, verifique a chave da API do OpenRouter e tente novamente.",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "Chave da API do TogetherAI inválida ou em branco. Por favor, verifique a chave da API do TogetherAI e tente novamente.",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Chave da API Perplexity inválida ou em branco, verifique a chave da API Perplexity e tente novamente",
|
|
53
54
|
"InvalidZeroOneAPIKey": "Chave de API ZeroOne inválida ou vazia, verifique a chave de API ZeroOne e tente novamente",
|
|
54
55
|
"InvalidZhipuAPIKey": "Chave de API Zhipu incorreta ou vazia, por favor, verifique a chave de API Zhipu e tente novamente",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "O serviço Ollama não está disponível, verifique se está iniciado corretamente",
|
|
61
62
|
"OpenAIBizError": "Erro ao solicitar o serviço OpenAI. Verifique ou tente novamente com base nas informações abaixo",
|
|
62
63
|
"OpenRouterBizError": "Erro de negócios ao solicitar o serviço de IA do OpenRouter. Por favor, verifique as informações abaixo ou tente novamente.",
|
|
64
|
+
"TogetherAIBizError": "Erro de negócios ao solicitar o serviço de IA do TogetherAI. Por favor, verifique as informações abaixo ou tente novamente.",
|
|
63
65
|
"PerplexityBizError": "Erro de negócios ao solicitar o serviço de IA Perplexity, verifique as informações a seguir ou tente novamente",
|
|
64
66
|
"PluginApiNotFound": "Desculpe, o API especificado não existe no manifesto do plugin. Verifique se o método de solicitação corresponde ao API do manifesto do plugin",
|
|
65
67
|
"PluginApiParamsError": "Desculpe, a validação dos parâmetros de entrada da solicitação do plugin falhou. Verifique se os parâmetros de entrada correspondem às informações de descrição do API",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "Insira sua chave da API do OpenRouter para iniciar a sessão. O aplicativo não irá armazenar sua chave da API.",
|
|
119
121
|
"title": "Usar chave da API do OpenRouter personalizada"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "Insira sua chave da API do TogetherAI para iniciar a sessão. O aplicativo não irá armazenar sua chave da API.",
|
|
125
|
+
"title": "Usar chave da API do TogetherAI personalizada"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "Insira sua chave da API Perplexity para iniciar a sessão. O aplicativo não irá armazenar sua chave da API",
|
|
123
129
|
"title": "Usar chave da API Perplexity personalizada"
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "Chave da API"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "Verifique se o endereço do proxy está preenchido corretamente"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "Adicione modelos personalizados, separando vários modelos com vírgula (,)",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "Nome do Modelo Personalizado"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "Insira a chave da API do TogetherAI AI",
|
|
208
|
+
"placeholder": "Chave da API do TogetherAI AI",
|
|
209
|
+
"title": "Chave da API"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity",
|
|
198
214
|
"token": {
|
package/locales/ru-RU/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"InvalidMoonshotAPIKey": "Moonshot AI API Key неверный или пустой, пожалуйста, проверьте ключ API Moonshot и повторите попытку",
|
|
50
50
|
"InvalidOllamaArgs": "Неверная конфигурация Ollama, пожалуйста, проверьте конфигурацию Ollama и повторите попытку",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "OpenRouter API Key недействителен или отсутствует. Пожалуйста, проверьте правильность OpenRouter API Key и повторите попытку",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API Key недействителен или отсутствует. Пожалуйста, проверьте правильность TogetherAI API Key и повторите попытку",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Неверный или пустой ключ API Perplexity. Пожалуйста, проверьте ключ API Perplexity и повторите попытку",
|
|
53
54
|
"InvalidZeroOneAPIKey": "Неверный или пустой ключ API ZeroOne. Пожалуйста, проверьте ключ API ZeroOne и повторите попытку",
|
|
54
55
|
"InvalidZhipuAPIKey": "Неверный или пустой ключ API Zhipu, пожалуйста, проверьте ключ API Zhipu и повторите попытку",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "Сервис Ollama недоступен. Пожалуйста, проверьте, запущен ли он корректно.",
|
|
61
62
|
"OpenAIBizError": "Ошибка запроса службы OpenAI. Устраните неполадку или повторите попытку, основываясь на следующей информации.",
|
|
62
63
|
"OpenRouterBizError": "Ошибка запроса к сервису OpenRouter AI. Пожалуйста, проверьте информацию ниже или повторите попытку",
|
|
64
|
+
"TogetherAIBizError": "Ошибка запроса к сервису TogetherAI AI. Пожалуйста, проверьте информацию ниже или повторите попытку",
|
|
63
65
|
"PerplexityBizError": "Ошибка обращения к сервису Perplexity AI. Пожалуйста, проверьте информацию ниже или повторите попытку",
|
|
64
66
|
"PluginApiNotFound": "К сожалению, API не существует в манифесте плагина. Пожалуйста, проверьте, соответствует ли ваш метод запроса API манифеста плагина",
|
|
65
67
|
"PluginApiParamsError": "К сожалению, проверка входных параметров для запроса плагина не удалась. Пожалуйста, проверьте, соответствуют ли входные параметры описанию API",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "Введите свой ключ API OpenRouter, чтобы начать сеанс. Приложение не будет сохранять ваш ключ API",
|
|
119
121
|
"title": "Использование собственного ключа API OpenRouter"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "Введите свой ключ API TogetherAI, чтобы начать сеанс. Приложение не будет сохранять ваш ключ API",
|
|
125
|
+
"title": "Использование собственного ключа API TogetherAI"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "Введите свой ключ API Perplexity, чтобы начать сеанс. Приложение не будет сохранять ваш ключ API",
|
|
123
129
|
"title": "Использовать пользовательский ключ API Perplexity"
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "API-ключ"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "Проверьте правильность заполнения адреса прокси"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "Добавьте пользовательскую модель, используя запятую (,) для разделения нескольких моделей",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "Имя пользовательской модели"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "Введите API-ключ от TogetherAI AI",
|
|
208
|
+
"placeholder": "Ключ API TogetherAI AI",
|
|
209
|
+
"title": "API-ключ"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity",
|
|
198
214
|
"token": {
|
package/locales/tr-TR/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"InvalidMoonshotAPIKey": "Geçersiz veya boş Moonshot AI API Anahtarı, lütfen Moonshot API Anahtarınızı kontrol edip tekrar deneyin",
|
|
50
50
|
"InvalidOllamaArgs": "Ollama yapılandırması yanlış, lütfen Ollama yapılandırmasını kontrol edip tekrar deneyin",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "OpenRouter API Anahtarı geçersiz veya boş, lütfen OpenRouter API Anahtarınızı kontrol edip tekrar deneyin",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API Anahtarı geçersiz veya boş, lütfen TogetherAI API Anahtarınızı kontrol edip tekrar deneyin",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Perplexity API Key geçersiz veya boş, lütfen Perplexity API Key'inizi kontrol edip tekrar deneyin",
|
|
53
54
|
"InvalidZeroOneAPIKey": "SıfırBirIoT API Anahtarı geçersiz veya boş. Lütfen SıfırBirIoT API Anahtarınızı kontrol edip tekrar deneyin",
|
|
54
55
|
"InvalidZhipuAPIKey": "Zhipu API Anahtarı yanlış veya boş, lütfen Zhipu API Anahtarınızı kontrol edip tekrar deneyin",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "Ollama 服务不可用,请检查是否已正常启动",
|
|
61
62
|
"OpenAIBizError": "OpenAI hizmeti talep ederken hata oluştu. Aşağıdaki bilgilere dayanarak sorun giderin veya tekrar deneyin.",
|
|
62
63
|
"OpenRouterBizError": "OpenRouter AI hizmetine yönelik istek hatası, lütfen aşağıdaki bilgilere göre sorunu gidermeye çalışın veya tekrar deneyin",
|
|
64
|
+
"TogetherAIBizError": "TogetherAI AI hizmetine yönelik istek hatası, lütfen aşağıdaki bilgilere göre sorunu gidermeye çalışın veya tekrar deneyin",
|
|
63
65
|
"PerplexityBizError": "Perplexity AI hizmetine yapılan istekte hata oluştu, lütfen aşağıdaki bilgilere göre sorunu gidermeye çalışın veya tekrar deneyin",
|
|
64
66
|
"PluginApiNotFound": "Üzgünüm, eklentinin bildiriminde API mevcut değil. Lütfen istek yönteminizin eklenti bildirim API'sı ile eşleşip eşleşmediğini kontrol edin",
|
|
65
67
|
"PluginApiParamsError": "Üzgünüm, eklenti isteği için giriş parametre doğrulaması başarısız oldu. Lütfen giriş parametrelerinin API açıklamasıyla eşleşip eşleşmediğini kontrol edin",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "Oturuma başlamak için OpenRouter API Anahtarınızı girin. Uygulama API Anahtarınızı kaydetmez",
|
|
119
121
|
"title": "Özel OpenRouter API Anahtarını Kullan"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "Oturuma başlamak için TogetherAI API Anahtarınızı girin. Uygulama API Anahtarınızı kaydetmez",
|
|
125
|
+
"title": "Özel TogetherAI API Anahtarını Kullan"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "Sohbeti başlatmak için Perplexity API Key'inizi girin. Uygulama API Key'inizi kaydetmez",
|
|
123
129
|
"title": "Özel Perplexity API Key'i Kullan"
|
|
@@ -179,18 +179,34 @@
|
|
|
179
179
|
},
|
|
180
180
|
"OpenRouter": {
|
|
181
181
|
"checker": {
|
|
182
|
-
"desc": "
|
|
182
|
+
"desc": "Proxy adresinin doğru şekilde doldurulup doldurulmadığını test edin"
|
|
183
183
|
},
|
|
184
184
|
"customModelName": {
|
|
185
|
-
"desc": "
|
|
186
|
-
"placeholder": "
|
|
187
|
-
"title": "
|
|
185
|
+
"desc": "Özel modeller ekleyin, birden fazla modeli virgülle (,) ayırarak yazın",
|
|
186
|
+
"placeholder": "model1,model2,model3",
|
|
187
|
+
"title": "Özel Model Adı"
|
|
188
188
|
},
|
|
189
189
|
"title": "OpenRouter",
|
|
190
190
|
"token": {
|
|
191
|
-
"desc": "
|
|
192
|
-
"placeholder": "OpenRouter AI API
|
|
193
|
-
"title": "API
|
|
191
|
+
"desc": "OpenRouter AI'dan gelen API Anahtarı'nı girin",
|
|
192
|
+
"placeholder": "OpenRouter AI API Anahtarı",
|
|
193
|
+
"title": "API Anahtarı"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "Proxy adresinin doğru şekilde doldurulup doldurulmadığını test edin"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "Özel modeller ekleyin, birden fazla modeli virgülle (,) ayırarak yazın",
|
|
202
|
+
"placeholder": "model1,model2,model3",
|
|
203
|
+
"title": "Özel Model Adı"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "TogetherAI AI'dan gelen API Anahtarı'nı girin",
|
|
208
|
+
"placeholder": "TogetherAI AI API Anahtarı",
|
|
209
|
+
"title": "API Anahtarı"
|
|
194
210
|
}
|
|
195
211
|
},
|
|
196
212
|
"Perplexity": {
|
package/locales/vi-VN/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"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",
|
|
50
50
|
"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",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "OpenRouter API Key không hợp lệ hoặc trống, vui lòng kiểm tra lại và thử lại",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API Key không hợp lệ hoặc trống, vui lòng kiểm tra lại và thử lại",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Khóa API Perplexity không hợp lệ hoặc trống, vui lòng kiểm tra lại và thử lại sau",
|
|
53
54
|
"InvalidZeroOneAPIKey": "Khóa API ZeroOne không hợp lệ hoặc trống, vui lòng kiểm tra lại khóa API ZeroOne và thử lại",
|
|
54
55
|
"InvalidZhipuAPIKey": "Khóa API Zhipu không chính xác hoặc trống, vui lòng kiểm tra lại Khóa API Zhipu và thử lại",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "Dịch vụ Ollama không khả dụng, vui lòng kiểm tra xem nó đã được khởi động chưa",
|
|
61
62
|
"OpenAIBizError": "Yêu cầu dịch vụ OpenAI gặp lỗi, vui lòng xác minh hoặc thử lại dựa trên thông tin dưới đây",
|
|
62
63
|
"OpenRouterBizError": "Yêu cầu dịch vụ OpenRouter AI gặp lỗi, vui lòng kiểm tra thông tin dưới đây hoặc thử lại",
|
|
64
|
+
"TogetherAIBizError": "Yêu cầu dịch vụ TogetherAI AI gặp lỗi, vui lòng kiểm tra thông tin dưới đây hoặc thử lại",
|
|
63
65
|
"PerplexityBizError": "Yêu cầu dịch vụ AI Perplexity gặp lỗi, vui lòng kiểm tra thông tin dưới đây hoặc thử lại sau",
|
|
64
66
|
"PluginApiNotFound": "Xin lỗi, không có API nào trong tệp mô tả plugin, vui lòng kiểm tra phương thức yêu cầu của bạn có khớp với API mô tả plugin không",
|
|
65
67
|
"PluginApiParamsError": "Xin lỗi, kiểm tra tham số đầu vào yêu cầu của plugin không thông qua, vui lòng kiểm tra tham số đầu vào có khớp với thông tin mô tả API không",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "Nhập OpenRouter 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",
|
|
119
121
|
"title": "Sử dụng OpenRouter API Key tùy chỉnh"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "Nhập TogetherAI 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",
|
|
125
|
+
"title": "Sử dụng TogetherAI API Key tùy chỉnh"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "Nhập Khóa API Perplexity của bạn để bắt đầu phiên làm việc. Ứng dụng sẽ không ghi lại Khóa API của bạn",
|
|
123
129
|
"title": "Sử dụng Khóa API Perplexity tùy chỉnh"
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "API Key"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "Kiểm tra xem địa chỉ proxy đã được điền đúng chưa"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "Thêm tên mô hình tùy chỉnh, nhiều mô hình sử dụng dấu phẩy (,) để ngăn cách",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "Tên mô hình tùy chỉnh"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "Nhập API Key từ TogetherAI AI",
|
|
208
|
+
"placeholder": "TogetherAI AI API Key",
|
|
209
|
+
"title": "API Key"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity AI",
|
|
198
214
|
"token": {
|
package/locales/zh-CN/error.json
CHANGED
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
"GroqBizError": "请求 Groq 服务出错,请根据以下信息排查或重试",
|
|
70
70
|
"InvalidOpenRouterAPIKey": "OpenRouter API Key 不正确或为空,请检查 OpenRouter API Key 后重试",
|
|
71
71
|
"OpenRouterBizError": "请求 OpenRouter AI 服务出错,请根据以下信息排查或重试",
|
|
72
|
+
"TogetherAIBizError": "请求 TogetherAI AI 服务出错,请根据以下信息排查或重试",
|
|
73
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API Key 不正确或为空,请检查 TogetherAI API Key 后重试",
|
|
72
74
|
"ZeroOneBizError": "请求零一万物服务出错,请根据以下信息排查或重试",
|
|
73
75
|
"InvalidZeroOneAPIKey": "零一万物 API Key 不正确或为空,请检查零一万物 API Key 后重试",
|
|
74
76
|
"InvalidOllamaArgs": "Ollama 配置不正确,请检查 Ollama 配置后重试",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "输入你的 OpenRouter API Key 即可开始会话。应用不会记录你的 API Key",
|
|
119
121
|
"title": "使用自定义 OpenRouter API Key"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "输入你的 TogetherAI API Key 即可开始会话。应用不会记录你的 API Key",
|
|
125
|
+
"title": "使用自定义 TogetherAI API Key"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "输入你的 Perplexity API Key 即可开始会话。应用不会记录你的 API Key",
|
|
123
129
|
"title": "使用自定义 Perplexity API Key"
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "API Key"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "测试代理地址是否正确填写"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "增加自定义模型,多个模型使用逗号(,)隔开",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "自定义模型名称"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "填入来自 TogetherAI AI 的 API Key",
|
|
208
|
+
"placeholder": "TogetherAI AI API Key",
|
|
209
|
+
"title": "API Key"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity",
|
|
198
214
|
"token": {
|
package/locales/zh-TW/error.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"InvalidMoonshotAPIKey": "Moonshot AI API 金鑰不正確或為空,請檢查 Moonshot API 金鑰後重試",
|
|
50
50
|
"InvalidOllamaArgs": "Ollama 配置不正確,請檢查 Ollama 配置後重試",
|
|
51
51
|
"InvalidOpenRouterAPIKey": "OpenRouter API 金鑰不正確或為空,請檢查 OpenRouter API 金鑰後重試",
|
|
52
|
+
"InvalidTogetherAIAPIKey": "TogetherAI API 金鑰不正確或為空,請檢查 TogetherAI API 金鑰後重試",
|
|
52
53
|
"InvalidPerplexityAPIKey": "Perplexity API Key 不正確或為空,請檢查 Perplexity API Key 後重試",
|
|
53
54
|
"InvalidZeroOneAPIKey": "零一萬物 API Key 不正確或為空,請檢查零一萬物 API Key 後重試",
|
|
54
55
|
"InvalidZhipuAPIKey": "Zhipu API Key 不正確或為空,請檢查 Zhipu API Key 後重試",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"OllamaServiceUnavailable": "未偵測到 Ollama 服務,請檢查是否正常啟動",
|
|
61
62
|
"OpenAIBizError": "請求 OpenAI 服務出錯。請根據以下資訊進行排查或重試。",
|
|
62
63
|
"OpenRouterBizError": "請求 OpenRouter AI 服務出錯,請根據以下信息排查或重試",
|
|
64
|
+
"TogetherAIBizError": "請求 TogetherAI AI 服務出錯,請根據以下信息排查或重試",
|
|
63
65
|
"PerplexityBizError": "請求 Perplexity AI 服務出錯,請根據以下信息排查或重試",
|
|
64
66
|
"PluginApiNotFound": "抱歉,外掛描述檔案中不存在該 API。請檢查您的請求方法與外掛清單 API 是否相符",
|
|
65
67
|
"PluginApiParamsError": "抱歉,該外掛請求的輸入參數驗證失敗。請檢查輸入參數與 API 描述資訊是否相符",
|
|
@@ -118,6 +120,10 @@
|
|
|
118
120
|
"description": "輸入你的 OpenRouter API 金鑰即可開始會話。應用不會記錄你的 API 金鑰",
|
|
119
121
|
"title": "使用自定義 OpenRouter API 金鑰"
|
|
120
122
|
},
|
|
123
|
+
"TogetherAI": {
|
|
124
|
+
"description": "輸入你的 TogetherAI API 金鑰即可開始會話。應用不會記錄你的 API 金鑰",
|
|
125
|
+
"title": "使用自定義 TogetherAI API 金鑰"
|
|
126
|
+
},
|
|
121
127
|
"Perplexity": {
|
|
122
128
|
"description": "輸入你的 Perplexity API Key 即可開始會話。應用不會記錄你的 API Key",
|
|
123
129
|
"title": "使用自定義 Perplexity API Key"
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
"title": "API 金鑰"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
"TogetherAI": {
|
|
197
|
+
"checker": {
|
|
198
|
+
"desc": "測試代理地址是否正確填寫"
|
|
199
|
+
},
|
|
200
|
+
"customModelName": {
|
|
201
|
+
"desc": "增加自定義模型,多個模型使用逗號(,)隔開",
|
|
202
|
+
"placeholder": "mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free",
|
|
203
|
+
"title": "自定義模型名稱"
|
|
204
|
+
},
|
|
205
|
+
"title": "TogetherAI",
|
|
206
|
+
"token": {
|
|
207
|
+
"desc": "填入來自 TogetherAI AI 的 API 金鑰",
|
|
208
|
+
"placeholder": "TogetherAI AI API 金鑰",
|
|
209
|
+
"title": "API 金鑰"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
196
212
|
"Perplexity": {
|
|
197
213
|
"title": "Perplexity AI",
|
|
198
214
|
"token": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.145.0",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
LobeOpenAI,
|
|
19
19
|
LobeOpenRouterAI,
|
|
20
20
|
LobePerplexityAI,
|
|
21
|
+
LobeTogetherAI,
|
|
21
22
|
LobeZhipuAI,
|
|
22
23
|
ModelProvider,
|
|
23
24
|
} from '@/libs/agent-runtime';
|
|
@@ -44,6 +45,7 @@ vi.mock('@/config/server', () => ({
|
|
|
44
45
|
ANTHROPIC_API_KEY: 'test-anthropic-key',
|
|
45
46
|
MISTRAL_API_KEY: 'test-mistral-key',
|
|
46
47
|
OPENROUTER_API_KEY: 'test-openrouter-key',
|
|
48
|
+
TOGETHERAI_API_KEY: 'test-togetherai-key',
|
|
47
49
|
})),
|
|
48
50
|
}));
|
|
49
51
|
|
|
@@ -339,6 +341,30 @@ describe('AgentRuntime', () => {
|
|
|
339
341
|
});
|
|
340
342
|
});
|
|
341
343
|
|
|
344
|
+
describe('Together AI provider', () => {
|
|
345
|
+
it('should initialize correctly', async () => {
|
|
346
|
+
const jwtPayload: JWTPayload = { apiKey: 'user-togetherai-key' };
|
|
347
|
+
const runtime = await AgentRuntime.initializeWithUserPayload(
|
|
348
|
+
ModelProvider.TogetherAI,
|
|
349
|
+
jwtPayload,
|
|
350
|
+
);
|
|
351
|
+
|
|
352
|
+
// 假设 LobeTogetherAI 是 TogetherAI 提供者的实现类
|
|
353
|
+
expect(runtime['_runtime']).toBeInstanceOf(LobeTogetherAI);
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
it('should initialize correctly without apiKey', async () => {
|
|
357
|
+
const jwtPayload: JWTPayload = {};
|
|
358
|
+
const runtime = await AgentRuntime.initializeWithUserPayload(
|
|
359
|
+
ModelProvider.TogetherAI,
|
|
360
|
+
jwtPayload,
|
|
361
|
+
);
|
|
362
|
+
|
|
363
|
+
// 假设 LobeTogetherAI 是 TogetherAI 提供者的实现类
|
|
364
|
+
expect(runtime['_runtime']).toBeInstanceOf(LobeTogetherAI);
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
|
|
342
368
|
it('should handle unknown provider gracefully', async () => {
|
|
343
369
|
const jwtPayload: JWTPayload = {};
|
|
344
370
|
const runtime = await AgentRuntime.initializeWithUserPayload('unknown', jwtPayload);
|