|
|
|
|
|
|
|
|
|
|
|
import { LlmModelType } from '@/constants/knowledge'; |
|
|
|
|
|
import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks'; |
|
|
import { Popover, Select } from 'antd'; |
|
|
import { Popover, Select } from 'antd'; |
|
|
import LlmSettingItems from '../llm-setting-items'; |
|
|
import LlmSettingItems from '../llm-setting-items'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const LLMSelect = ({ id, value, onChange }: IProps) => { |
|
|
const LLMSelect = ({ id, value, onChange }: IProps) => { |
|
|
|
|
|
const modelOptions = useSelectLlmOptionsByModelType(); |
|
|
|
|
|
|
|
|
const content = ( |
|
|
const content = ( |
|
|
<div style={{ width: 400 }}> |
|
|
<div style={{ width: 400 }}> |
|
|
<LlmSettingItems |
|
|
<LlmSettingItems |
|
|
|
|
|
|
|
|
destroyTooltipOnHide |
|
|
destroyTooltipOnHide |
|
|
> |
|
|
> |
|
|
<Select |
|
|
<Select |
|
|
|
|
|
options={[ |
|
|
|
|
|
...modelOptions[LlmModelType.Chat], |
|
|
|
|
|
...modelOptions[LlmModelType.Image2text], |
|
|
|
|
|
]} |
|
|
style={{ width: '100%' }} |
|
|
style={{ width: '100%' }} |
|
|
dropdownStyle={{ display: 'none' }} |
|
|
dropdownStyle={{ display: 'none' }} |
|
|
id={id} |
|
|
id={id} |