From 371b4359af3eb23a19903afbbd881498bf7bf869 Mon Sep 17 00:00:00 2001 From: gray Date: Fri, 6 Dec 2024 11:03:52 +0800 Subject: [PATCH] fixed model network search --- src/FE/components/Chat/Chat.tsx | 34 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/FE/components/Chat/Chat.tsx b/src/FE/components/Chat/Chat.tsx index 7fd21949..f8773e4d 100644 --- a/src/FE/components/Chat/Chat.tsx +++ b/src/FE/components/Chat/Chat.tsx @@ -394,6 +394,10 @@ export const Chat = memo(({ stopConversationRef }: Props) => { field: 'selectModel', value: model, }); + handleUpdateUserModelConfig({ + ...userModelConfig, + enableSearch: model.allowSearch, + }); putUserChatModel(selectChat.id, model.modelId); }} /> @@ -408,8 +412,7 @@ export const Chat = memo(({ stopConversationRef }: Props) => { {hasModel() && (
- {selectModel && - selectModel.allowSystemPrompt && + {selectModel?.allowSystemPrompt && userModelConfig?.prompt && ( { onChangePrompt={onChangePrompt} /> )} - {userModelConfig?.temperature !== undefined && - selectModel?.allowTemperature && ( + {selectModel?.allowTemperature && + userModelConfig?.temperature !== undefined && ( { } /> )} - {userModelConfig?.enableSearch != undefined && ( - { - handleUpdateUserModelConfig({ - enableSearch, - }); - }} - /> - )} + {selectModel?.allowSearch && + userModelConfig?.enableSearch != undefined && ( + { + handleUpdateUserModelConfig({ + enableSearch, + }); + }} + /> + )} {/*