display lastModelName at the top (WorkHeader)

This commit is contained in:
josc146
2023-11-20 23:27:44 +08:00
parent 41e5bd5eb8
commit 66e43c9d9b
5 changed files with 17 additions and 0 deletions

View File

@@ -352,6 +352,8 @@ const ChatPanel: FC = observer(() => {
console.debug('json error', error);
return;
}
if (data.model)
commonStore.setLastModelName(data.model);
if (data.choices && Array.isArray(data.choices) && data.choices.length > 0) {
answer += data.choices[0]?.delta?.content || '';
commonStore.conversation[answerId!].content = answer;