This commit is contained in:
quzard 2023-06-08 22:41:11 +08:00
parent 139e08edba
commit 1fa7cd4a94
2 changed files with 35 additions and 1 deletions

View File

@ -71,6 +71,24 @@ func init() {
Root: "gpt-3.5-turbo-0301", Root: "gpt-3.5-turbo-0301",
Parent: nil, Parent: nil,
}, },
{
Id: "gpt-35-turbo",
Object: "model",
Created: 1677649963,
OwnedBy: "openai",
Permission: permission,
Root: "gpt-35-turbo",
Parent: nil,
},
{
Id: "gpt-35-turbo-0301",
Object: "model",
Created: 1677649963,
OwnedBy: "openai",
Permission: permission,
Root: "gpt-35-turbo-0301",
Parent: nil,
},
{ {
Id: "gpt-4", Id: "gpt-4",
Object: "model", Object: "model",

View File

@ -232,6 +232,15 @@ const ChannelsTable = () => {
setLoading(false); setLoading(false);
}; };
const renderModels = (modelString) => {
let models = modelString.split(",");
return models.map((model) => (
<Label>
{model}
</Label>
))
}
return ( return (
<> <>
<Form onSubmit={searchChannels}> <Form onSubmit={searchChannels}>
@ -297,6 +306,9 @@ const ChannelsTable = () => {
> >
响应时间 响应时间
</Table.HeaderCell> </Table.HeaderCell>
<Table.HeaderCell>
支持的模型
</Table.HeaderCell>
<Table.HeaderCell <Table.HeaderCell
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
onClick={() => { onClick={() => {
@ -332,6 +344,10 @@ const ChannelsTable = () => {
basic basic
/> />
</Table.Cell> </Table.Cell>
<Table.Cell>
{channel.models.length > 0 ? renderModels(channel.models) :<Label></Label>
}
</Table.Cell>
<Table.Cell> <Table.Cell>
<Popup <Popup
content={channel.balance_updated_time ? renderTimestamp(channel.balance_updated_time) : '未更新'} content={channel.balance_updated_time ? renderTimestamp(channel.balance_updated_time) : '未更新'}
@ -408,7 +424,7 @@ const ChannelsTable = () => {
<Table.Footer> <Table.Footer>
<Table.Row> <Table.Row>
<Table.HeaderCell colSpan='8'> <Table.HeaderCell colSpan='9'>
<Button size='small' as={Link} to='/channel/add' loading={loading}> <Button size='small' as={Link} to='/channel/add' loading={loading}>
添加新的渠道 添加新的渠道
</Button> </Button>