From 8eb56e9128249d4544aa31c294227397f1cbf760 Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 23 Sep 2024 10:53:18 +0800 Subject: [PATCH] fix: Add model by ollama in model provider page, user can't choose the model in chat window. #2479 (#2529) ### What problem does this PR solve? fix: Add model by ollama in model provider page, user can't choose the model in chat window. #2479 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- 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 >