docs: update translation and api url tip
This commit is contained in:
parent
6e2ab66b81
commit
596cf8e3f2
@ -258,7 +258,7 @@
|
||||
"provider.search_placeholder": "Search model id or name",
|
||||
"provider.api.url.reset": "Reset",
|
||||
"provider.api.url.preview": "Preview: {{url}}",
|
||||
"provider.api.url.tip": "Add / at the end to force using the input address",
|
||||
"provider.api.url.tip": "Ending with / ignores v1, ending with # forces use of input address",
|
||||
"models.default_assistant_model": "Default Assistant Model",
|
||||
"models.topic_naming_model": "Topic Naming Model",
|
||||
"models.translate_model": "Translate Model",
|
||||
|
||||
@ -258,7 +258,7 @@
|
||||
"provider.search_placeholder": "搜索模型 ID 或名称",
|
||||
"provider.api.url.reset": "重置",
|
||||
"provider.api.url.preview": "预览: {{url}}",
|
||||
"provider.api.url.tip": "结尾添加 / 强制使用输入地址",
|
||||
"provider.api.url.tip": "/结尾忽略v1版本,#结尾强制使用输入地址",
|
||||
"models.default_assistant_model": "默认助手模型",
|
||||
"models.topic_naming_model": "话题命名模型",
|
||||
"models.translate_model": "翻译模型",
|
||||
|
||||
@ -258,7 +258,7 @@
|
||||
"provider.search_placeholder": "搜尋模型 ID 或名稱",
|
||||
"provider.api.url.reset": "重置",
|
||||
"provider.api.url.preview": "預覽: {{url}}",
|
||||
"provider.api.url.tip": "結尾新增 / 強制使用輸入地址",
|
||||
"provider.api.url.tip": "/結尾忽略v1版本,#結尾強制使用輸入位址",
|
||||
"models.default_assistant_model": "預設助手模型",
|
||||
"models.topic_naming_model": "話題命名模型",
|
||||
"models.translate_model": "翻譯模型",
|
||||
|
||||
@ -82,7 +82,13 @@ const ProviderSetting: FC<Props> = ({ provider: _provider }) => {
|
||||
updateProvider({ ...provider, apiHost: configedApiHost })
|
||||
}
|
||||
|
||||
const hostPreview = (apiHost.endsWith('/') ? apiHost : `${apiHost}/v1/`) + 'chat/completions'
|
||||
const hostPreview = () => {
|
||||
if (apiHost.endsWith('#')) {
|
||||
return apiHost.replace('#', '')
|
||||
}
|
||||
|
||||
return (apiHost.endsWith('/') ? apiHost : `${apiHost}/v1/`) + 'chat/completions'
|
||||
}
|
||||
|
||||
return (
|
||||
<SettingContainer
|
||||
@ -143,7 +149,7 @@ const ProviderSetting: FC<Props> = ({ provider: _provider }) => {
|
||||
</Space.Compact>
|
||||
{isOpenAIProvider(provider) && (
|
||||
<SettingHelpTextRow style={{ justifyContent: 'space-between' }}>
|
||||
<SettingHelpText style={{ marginLeft: 6 }}>{hostPreview}</SettingHelpText>
|
||||
<SettingHelpText style={{ marginLeft: 6 }}>{hostPreview()}</SettingHelpText>
|
||||
<SettingHelpText>{t('settings.provider.api.url.tip')}</SettingHelpText>
|
||||
</SettingHelpTextRow>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user