Skip to content

Commit

Permalink
💄 style: provider changes with model in model settings (#3146)
Browse files Browse the repository at this point in the history
  • Loading branch information
RubuJam authored Jul 8, 2024
1 parent 7100d1c commit e53bb5a
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion locales/ar/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "الحد الأقصى للردود"
},
"model": {
"desc": "نموذج ChatGPT",
"desc": "{{provider}} نموذج",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/bg-BG/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Ограничение за максимален брой токени"
},
"model": {
"desc": "Модел на ChatGPT",
"desc": "{{provider}} модел",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/de-DE/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Maximale Token pro Antwort"
},
"model": {
"desc": "ChatGPT-Modell",
"desc": "{{provider}} Modell",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/en-US/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Max Tokens Limit"
},
"model": {
"desc": "ChatGPT model",
"desc": "{{provider}} model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/es-ES/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Límite de tokens por respuesta"
},
"model": {
"desc": "Modelo ChatGPT",
"desc": "{{provider}} modelo",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/fr-FR/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Limite de tokens par réponse"
},
"model": {
"desc": "Modèle ChatGPT",
"desc": "Modèle {{provider}}",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/it-IT/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Limite di risposta singola"
},
"model": {
"desc": "Modello ChatGPT",
"desc": "Modello {{provider}}",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/ja-JP/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "単一応答制限"
},
"model": {
"desc": "ChatGPT モデル",
"desc": "{{provider}}モデル",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/ko-KR/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "단일 응답 제한"
},
"model": {
"desc": "ChatGPT 모델",
"desc": "{{provider}} 모델",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/nl-NL/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Limiet voor enkele reacties"
},
"model": {
"desc": "ChatGPT-model",
"desc": "{{provider}} model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/pl-PL/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Limit jednorazowej odpowiedzi"
},
"model": {
"desc": "Model ChatGPT",
"desc": "{{provider}} model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/pt-BR/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Limite de resposta única"
},
"model": {
"desc": "Modelo ChatGPT",
"desc": "{{provider}} modelo",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/ru-RU/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Максимальное количество токенов"
},
"model": {
"desc": "Модель ChatGPT",
"desc": "{{provider}} модель",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/tr-TR/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Max Token Sınırlaması"
},
"model": {
"desc": "ChatGPT modeli",
"desc": "{{provider}} Model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/vi-VN/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "Giới hạn phản hồi một lần"
},
"model": {
"desc": "Mô hình ChatGPT",
"desc": "Mô hình {{provider}}",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/zh-CN/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "单次回复限制"
},
"model": {
"desc": "ChatGPT 模型",
"desc": "{{provider}} 模型",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
2 changes: 1 addition & 1 deletion locales/zh-TW/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"title": "單次回覆限制"
},
"model": {
"desc": "ChatGPT 模型",
"desc": "{{provider}} 模型",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
Expand Down
5 changes: 4 additions & 1 deletion src/features/AgentSetting/AgentModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { memo } from 'react';
import { useTranslation } from 'react-i18next';

import { FORM_STYLE } from '@/const/layoutTokens';
import { useProviderName } from '@/hooks/useProviderName';

import { useStore } from '../store';
import { selectors } from '../store/selectors';
Expand All @@ -21,13 +22,15 @@ const AgentModal = memo(() => {
return [config.enableMaxTokens, s.setAgentConfig];
});

const providerName = useProviderName(useStore((s) => s.config.provider) as string);

useAgentSyncSettings(form);

const model: ItemGroup = {
children: [
{
children: <ModelSelect />,
desc: t('settingModel.model.desc'),
desc: t('settingModel.model.desc', { provider: providerName }),
label: t('settingModel.model.title'),
name: 'model',
tag: 'model',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/default/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default {
title: '单次回复限制',
},
model: {
desc: 'ChatGPT 模型',
desc: '{{provider}} 模型',
list: {
'gpt-3.5-turbo': 'GPT 3.5',
'gpt-3.5-turbo-16k': 'GPT 3.5 (16K)',
Expand Down

0 comments on commit e53bb5a

Please sign in to comment.