refactor: playground chat

This commit is contained in:
jialin
2024-09-22 14:55:23 +08:00
parent 4f4f00f0c8
commit 1abaa164f5
15 changed files with 406 additions and 173 deletions
+6 -9
View File
@@ -3,7 +3,7 @@ import HotKeys from '@/config/hotkeys';
import { MessageOutlined, OneToOneOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-components';
import { useIntl, useSearchParams } from '@umijs/max';
import { Button, Divider, Segmented, Space, Tabs, TabsProps } from 'antd';
import { Button, Segmented, Space, Tabs, TabsProps } from 'antd';
import classNames from 'classnames';
import _ from 'lodash';
import { useCallback, useEffect, useRef, useState } from 'react';
@@ -45,7 +45,11 @@ const Playground: React.FC = () => {
key: 'chat',
label: 'Chat',
children: (
<GroundLeft parameters={params} ref={groundLeftRef}></GroundLeft>
<GroundLeft
parameters={params}
ref={groundLeftRef}
modelList={modelList}
></GroundLeft>
)
},
{
@@ -146,13 +150,6 @@ const Playground: React.FC = () => {
collapse: collapse
})}
>
<div
className={classNames('divider-line', {
collapse: collapse
})}
>
<Divider type="vertical" />
</div>
<div className={classNames('params')}>
<div
className={classNames('params-box', {