2024-06-25 12:09:07 +08:00
|
|
|
import { Popover, Select } from 'antd';
|
|
|
|
|
import LlmSettingItems from '../llm-setting-items';
|
|
|
|
|
|
2024-06-25 19:28:24 +08:00
|
|
|
interface IProps {
|
|
|
|
|
id?: string;
|
|
|
|
|
value?: string;
|
|
|
|
|
onChange?: (value: string) => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const LLMSelect = ({ id, value, onChange }: IProps) => {
|
2024-06-25 12:09:07 +08:00
|
|
|
const content = (
|
2024-06-25 19:28:24 +08:00
|
|
|
<div style={{ width: 400 }}>
|
|
|
|
|
<LlmSettingItems
|
|
|
|
|
formItemLayout={{ labelCol: { span: 10 }, wrapperCol: { span: 14 } }}
|
|
|
|
|
></LlmSettingItems>
|
2024-06-25 12:09:07 +08:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Popover content={content} trigger="click" placement="left" arrow={false}>
|
2024-06-25 19:28:24 +08:00
|
|
|
<Select
|
|
|
|
|
style={{ width: '100%' }}
|
|
|
|
|
dropdownStyle={{ display: 'none' }}
|
|
|
|
|
id={id}
|
|
|
|
|
value={value}
|
|
|
|
|
onChange={onChange}
|
|
|
|
|
/>
|
2024-06-25 12:09:07 +08:00
|
|
|
</Popover>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default LLMSelect;
|