-
Notifications
You must be signed in to change notification settings - Fork 11.2k
feat: volcengine支持自定义域名 #1886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: volcengine支持自定义域名 #1886
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -235,7 +235,7 @@ const EditChannelModal = (props) => { | |
| pass_through_body_enabled: false, | ||
| system_prompt: '', | ||
| }); | ||
| const showApiConfigCard = inputs.type !== 45; // 控制是否显示 API 配置卡片(仅当渠道类型不是 豆包 时显示) | ||
| const showApiConfigCard = true; // 控制是否显示 API 配置卡片 | ||
| const getInitValues = () => ({ ...originInputs }); | ||
|
|
||
| // 处理渠道额外设置的更新 | ||
|
|
@@ -342,6 +342,10 @@ const EditChannelModal = (props) => { | |
| case 36: | ||
| localModels = ['suno_music', 'suno_lyrics']; | ||
| break; | ||
| case 45: | ||
| localModels = getChannelModels(value); | ||
| setInputs((prevInputs) => ({ ...prevInputs, base_url: 'https://ark.cn-beijing.volces.com' })); | ||
| break; | ||
| default: | ||
| localModels = getChannelModels(value); | ||
| break; | ||
|
|
@@ -842,6 +846,10 @@ const EditChannelModal = (props) => { | |
| showInfo(t('请至少选择一个模型!')); | ||
| return; | ||
| } | ||
| if (localInputs.type === 45 && (!localInputs.base_url || localInputs.base_url.trim() === '')) { | ||
| showInfo(t('请输入API地址!')); | ||
| return; | ||
| } | ||
| if ( | ||
| localInputs.model_mapping && | ||
| localInputs.model_mapping !== '' && | ||
|
|
@@ -1809,6 +1817,30 @@ const EditChannelModal = (props) => { | |
| /> | ||
| </div> | ||
| )} | ||
|
|
||
| {inputs.type === 45 && ( | ||
| <div> | ||
| <Form.Select | ||
| field='base_url' | ||
| label={t('API地址')} | ||
| placeholder={t('请选择API地址')} | ||
| onChange={(value) => | ||
| handleInputChange('base_url', value) | ||
| } | ||
| optionList={[ | ||
| { | ||
| value: 'https://ark.cn-beijing.volces.com', | ||
| label: 'https://ark.cn-beijing.volces.com' | ||
| }, | ||
| { | ||
| value: 'https://ark.ap-southeast.bytepluses.com', | ||
| label: 'https://ark.ap-southeast.bytepluses.com' | ||
| } | ||
|
Comment on lines
+1831
to
+1838
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Outbound Volcengine domain is misspelled and missing the region suffix The dropdown hard-codes Update the option to the documented host before shipping. Based on learnings 🤖 Prompt for AI Agents |
||
| ]} | ||
| defaultValue='https://ark.cn-beijing.volces.com' | ||
| /> | ||
| </div> | ||
| )} | ||
| </Card> | ||
| )} | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个渠道不让手动写,只能让选择