- {isEdit ? '更新渠道信息' : '创建新的渠道'}
+ {isEdit
+ ? t('channel.edit.title_edit')
+ : t('channel.edit.title_create')}
{
onChange={handleInputChange}
/>
+
+
+
+
+
+
+
+ {/* Azure OpenAI specific fields */}
{inputs.type === 3 && (
<>
@@ -295,9 +327,7 @@ const EditChannel = () => {
{
{
>
)}
+
+ {/* Custom base URL field */}
{inputs.type === 8 && (
)}
-
-
-
-
-
-
+
{inputs.type === 18 && (
{
{inputs.type === 21 && (
{
{inputs.type === 17 && (
{
)}
{inputs.type === 34 && (
-
- 对于 Coze 而言,模型名称即 Bot ID,你可以添加一个前缀
- `bot-`,例如:`bot-123456`。
-
+ {t('channel.edit.coze_notice')}
)}
{inputs.type === 40 && (
- 对于豆包而言,需要手动去{' '}
+ {t('channel.edit.douban_notice')}
- 模型推理页面
- {' '}
- 创建推理接入点,以接入点名称作为模型名称,例如:`ep-20240608051426-tkxvl`。
+ {t('channel.edit.douban_notice_link')}
+
+ {t('channel.edit.douban_notice_2')}
)}
{inputs.type !== 43 && (
{
});
}}
>
- 填入相关模型
+ {t('channel.edit.buttons.fill_models')}
- 填入
+ {t('channel.edit.buttons.add_custom')}
}
- placeholder='输入自定义模型名称'
+ placeholder={t('channel.edit.buttons.custom_placeholder')}
value={customModel}
onChange={(e, { value }) => {
setCustomModel(value);
@@ -493,12 +488,10 @@ const EditChannel = () => {
<>
{
{
label='Region'
name='region'
required
- placeholder={'region,e.g. us-west-2'}
+ placeholder={t('channel.edit.aws_region_placeholder')}
onChange={handleConfigChange}
value={config.region}
autoComplete=''
@@ -540,7 +533,7 @@ const EditChannel = () => {
label='AK'
name='ak'
required
- placeholder={'AWS IAM Access Key'}
+ placeholder={t('channel.edit.aws_ak_placeholder')}
onChange={handleConfigChange}
value={config.ak}
autoComplete=''
@@ -549,7 +542,7 @@ const EditChannel = () => {
label='SK'
name='sk'
required
- placeholder={'AWS IAM Secret Key'}
+ placeholder={t('channel.edit.aws_sk_placeholder')}
onChange={handleConfigChange}
value={config.sk}
autoComplete=''
@@ -562,27 +555,25 @@ const EditChannel = () => {
label='Region'
name='region'
required
- placeholder={'Vertex AI Region.g. us-east5'}
+ placeholder={t('channel.edit.vertex_region_placeholder')}
onChange={handleConfigChange}
value={config.region}
autoComplete=''
/>
{
)}
{inputs.type === 34 && (
{
(batch ? (
{
) : (
))}
- {inputs.type === 37 && (
-
-
-
- )}
{inputs.type !== 33 && !isEdit && (
setBatch(!batch)}
/>
@@ -660,11 +636,9 @@ const EditChannel = () => {
inputs.type !== 22 && (
{
/>
)}
-
+
diff --git a/web/default/src/pages/Channel/index.js b/web/default/src/pages/Channel/index.js
index 73460cfa..97c417d8 100644
--- a/web/default/src/pages/Channel/index.js
+++ b/web/default/src/pages/Channel/index.js
@@ -1,16 +1,21 @@
import React from 'react';
import { Card } from 'semantic-ui-react';
import ChannelsTable from '../../components/ChannelsTable';
+import { useTranslation } from 'react-i18next';
-const Channel = () => (
-
-
-
- 管理渠道
-
-
-
-
-);
+const Channel = () => {
+ const { t } = useTranslation();
+
+ return (
+
+
+
+ {t('channel.title')}
+
+
+
+
+ );
+};
export default Channel;