mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 19:46:44 +08:00
### What problem does this PR solve? fix: Merge models of the same category #2479 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { LlmModelType } from '@/constants/knowledge';
|
||||
import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks';
|
||||
import { useComposeLlmOptionsByModelTypes } from '@/hooks/llm-hooks';
|
||||
import { Popover, Select } from 'antd';
|
||||
import LlmSettingItems from '../llm-setting-items';
|
||||
|
||||
@ -10,7 +10,10 @@ interface IProps {
|
||||
}
|
||||
|
||||
const LLMSelect = ({ id, value, onChange }: IProps) => {
|
||||
const modelOptions = useSelectLlmOptionsByModelType();
|
||||
const modelOptions = useComposeLlmOptionsByModelTypes([
|
||||
LlmModelType.Chat,
|
||||
LlmModelType.Image2text,
|
||||
]);
|
||||
|
||||
const content = (
|
||||
<div style={{ width: 400 }}>
|
||||
@ -29,10 +32,7 @@ const LLMSelect = ({ id, value, onChange }: IProps) => {
|
||||
destroyTooltipOnHide
|
||||
>
|
||||
<Select
|
||||
options={[
|
||||
...modelOptions[LlmModelType.Chat],
|
||||
...modelOptions[LlmModelType.Image2text],
|
||||
]}
|
||||
options={modelOptions}
|
||||
style={{ width: '100%' }}
|
||||
dropdownStyle={{ display: 'none' }}
|
||||
id={id}
|
||||
|
||||
Reference in New Issue
Block a user