Skip to content

Commit

Permalink
fix: Fix some display issues on the AI route edit page (higress-group…
Browse files Browse the repository at this point in the history
  • Loading branch information
CH3CHO authored Feb 22, 2025
1 parent e75d63e commit 84a08e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions frontend/src/locales/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"ollamaServerHost": "Ollama Service Host",
"ollamaServerPort": "Ollama Service Port",
"openaiServerType": "OpenAI Service Type",
"openaiCustomUrl": "Custom OpenAI Service URL"
"openaiCustomUrl": "Custom OpenAI Service Base URL"
},
"rules": {
"tokenRequired": "Please input auth token",
Expand All @@ -247,12 +247,12 @@
"azureServiceUrlRequired": "Please input Azure service URL",
"ollamaServerHostRequired": "Please input Ollama service host",
"ollamaServerPortRequired": "Please input Ollama service port",
"openaiCustomUrlRequired": "Please input a valid custom OpenAI service URL"
"openaiCustomUrlRequired": "Please input a valid custom OpenAI service base URL"
},
"placeholder": {
"azureServiceUrlPlaceholder": "It shall contain \"/chat/completions\" in the path and \"api-version\" in the query string",
"ollamaServerHostPlaceholder": "Please input a hostname, domain name or IP address",
"openaiCustomUrlPlaceholder": "Sample: http://www.example.com/myai/v1/chat/completions"
"openaiCustomUrlPlaceholder": "Sample: https://api.openai.com/v1"
},
"openaiServerType": {
"official": "OpenAI Official Service",
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"ollamaServerHost": "Ollama 服务主机名",
"ollamaServerPort": "Ollama 服务端口",
"openaiServerType": "OpenAI 服务类型",
"openaiCustomUrl": "自定义 OpenAI 服务 URL"
"openaiCustomUrl": "自定义 OpenAI 服务 BaseURL"
},
"rules": {
"tokenRequired": "请输入凭证",
Expand All @@ -246,12 +246,12 @@
"azureServiceUrlRequired": "请输入 Azure 服务 URL",
"ollamaServerHostRequired": "请输入 Ollama 服务主机名",
"ollamaServerPortRequired": "请输入 Ollama 服务端口",
"openaiCustomUrlRequired": "请输入合法的自定义 OpenAI 服务 URL"
"openaiCustomUrlRequired": "请输入合法的自定义 OpenAI 服务 BaseURL"
},
"placeholder": {
"azureServiceUrlPlaceholder": "需包含“/chat/completions”路径和“api-version”查询参数",
"ollamaServerHostPlaceholder": "请填写机器名、域名或 IP 地址",
"openaiCustomUrlPlaceholder": "示例:http://www.example.com/myai/v1/chat/completions"
"openaiCustomUrlPlaceholder": "示例:https://api.openai.com/v1"
},
"openaiServerType": {
"official": "OpenAI 官方服务",
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/pages/ai/components/ProviderForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,6 @@ const ProviderForm: React.FC = forwardRef((props: { value: any }, ref) => {
)}
</Form.List>

{/* 令牌降级 */}
<Form.Item
name="failoverEnabled"
initialValue={false}
label={t('llmProvider.providerForm.label.failoverEnabled')}
valuePropName="checked"
extra={t('llmProvider.providerForm.label.failoverEnabledExtra')}
>
<Switch onChange={e => setFailoverEnabled(e)} />
</Form.Item>

{
providerType === 'openai' && (
<>
Expand Down Expand Up @@ -361,6 +350,17 @@ const ProviderForm: React.FC = forwardRef((props: { value: any }, ref) => {
)
}

{/* 令牌降级 */}
<Form.Item
name="failoverEnabled"
initialValue={false}
label={t('llmProvider.providerForm.label.failoverEnabled')}
valuePropName="checked"
extra={t('llmProvider.providerForm.label.failoverEnabledExtra')}
>
<Switch onChange={e => setFailoverEnabled(e)} />
</Form.Item>

{
failoverEnabled ?
<>
Expand Down

0 comments on commit 84a08e2

Please sign in to comment.