fix(web): custom model not support api key edit
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:49:28
|
* @Date: 2026-02-03 16:49:28
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-04-16 18:03:53
|
* @Last Modified time: 2026-04-21 15:02:53
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Custom Model Modal
|
* Custom Model Modal
|
||||||
@@ -230,21 +230,23 @@ const CustomModelModal = forwardRef<CustomModelModalRef, CustomModelModalProps>(
|
|||||||
<Input.TextArea placeholder={t('common.pleaseEnter')} />
|
<Input.TextArea placeholder={t('common.pleaseEnter')} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
{!isEdit && <>
|
||||||
name={["api_keys", 0, "api_key"]}
|
<Form.Item
|
||||||
label={t('modelNew.api_key')}
|
name={["api_keys", 0, "api_key"]}
|
||||||
rules={[{ required: true, message: t('common.inputPlaceholder', { title: t('modelNew.api_key') }) }]}
|
label={t('modelNew.api_key')}
|
||||||
>
|
rules={[{ required: true, message: t('common.inputPlaceholder', { title: t('modelNew.api_key') }) }]}
|
||||||
<Input.Password placeholder={t('common.pleaseEnter')} />
|
>
|
||||||
</Form.Item>
|
<Input.Password placeholder={t('common.pleaseEnter')} />
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["api_keys", 0, "api_base"]}
|
name={["api_keys", 0, "api_base"]}
|
||||||
label={t('modelNew.api_base')}
|
label={t('modelNew.api_base')}
|
||||||
rules={[{ required: true, message: t('common.inputPlaceholder', { title: t('modelNew.api_base') }) }]}
|
rules={[{ required: true, message: t('common.inputPlaceholder', { title: t('modelNew.api_base') }) }]}
|
||||||
>
|
>
|
||||||
<Input placeholder="https://api.example.com/v1" />
|
<Input placeholder="https://api.example.com/v1" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
</>}
|
||||||
|
|
||||||
{['llm', 'chat'].includes(modelType as string) &&
|
{['llm', 'chat'].includes(modelType as string) &&
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
|
|||||||
Reference in New Issue
Block a user