From bcef08770d7d65a3cc844148d27d782045feabfa Mon Sep 17 00:00:00 2001 From: bill Date: Mon, 23 Sep 2024 10:42:00 +0800 Subject: [PATCH] fix: Add model by ollama in model provider page, user can't choose the model in chat window. #2479 --- web/src/components/llm-select/index.tsx | 8 ++++++++ web/src/hooks/llm-hooks.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/components/llm-select/index.tsx b/web/src/components/llm-select/index.tsx index e3b348be98d..0da49e81465 100644 --- a/web/src/components/llm-select/index.tsx +++ b/web/src/components/llm-select/index.tsx @@ -1,3 +1,5 @@ +import { LlmModelType } from '@/constants/knowledge'; +import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks'; import { Popover, Select } from 'antd'; import LlmSettingItems from '../llm-setting-items'; @@ -8,6 +10,8 @@ interface IProps { } const LLMSelect = ({ id, value, onChange }: IProps) => { + const modelOptions = useSelectLlmOptionsByModelType(); + const content = (
{ destroyTooltipOnHide >