improve the compatibility between frontend presets and chatgpt api

This commit is contained in:
josc146 2023-10-28 23:06:19 +08:00
parent ff7306349a
commit 54355d5a7a

View File

@ -339,9 +339,9 @@ const ChatPanel: FC = observer(() => {
model: commonStore.settings.apiChatModelName, // 'gpt-3.5-turbo'
temperature: apiParams.temperature,
top_p: apiParams.topP,
user_name: commonStore.activePreset?.userName,
assistant_name: commonStore.activePreset?.assistantName,
presystem: commonStore.activePreset?.presystem
user_name: commonStore.activePreset?.userName || undefined,
assistant_name: commonStore.activePreset?.assistantName || undefined,
presystem: commonStore.activePreset?.presystem && undefined
}),
signal: chatSseController?.signal,
onmessage(e) {