Merge pull request #271 from p3psi-boo/main

feat: 添加同步上游模型列表按钮
This commit is contained in:
Calcium-Ion
2024-05-23 19:36:28 +08:00
committed by GitHub
3 changed files with 104 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import {
Space,
Spin,
Button,
Tooltip,
Input,
Typography,
Select,
@@ -24,6 +25,7 @@ import {
} from '@douyinfe/semi-ui';
import { Divider } from 'semantic-ui-react';
import { getChannelModels, loadChannelModels } from '../../components/utils.js';
import axios from 'axios';
const MODEL_MAPPING_EXAMPLE = {
'gpt-3.5-turbo-0301': 'gpt-3.5-turbo',
@@ -331,6 +333,7 @@ const EditChannel = (props) => {
handleInputChange('models', localModels);
};
return (
<>
<SideSheet
@@ -550,6 +553,16 @@ const EditChannel = (props) => {
>
填入所有模型
</Button>
<Tooltip content={fetchButtonTips}>
<Button
type='tertiary'
onClick={() => {
fetchUpstreamModelList('models');
}}
>
获取模型列表
</Button>
</Tooltip>
<Button
type='warning'
onClick={() => {