chore
This commit is contained in:
@@ -109,8 +109,9 @@ const CompletionPanel: FC = observer(() => {
|
||||
}),
|
||||
signal: completionSseController?.signal,
|
||||
onmessage(e) {
|
||||
if (finished) return;
|
||||
scrollToBottom();
|
||||
if (!finished && e.data.trim() === '[DONE]') {
|
||||
if (e.data.trim() === '[DONE]') {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +125,7 @@ const CompletionPanel: FC = observer(() => {
|
||||
if (data.model)
|
||||
commonStore.setLastModelName(data.model);
|
||||
if (data.choices && Array.isArray(data.choices) && data.choices.length > 0) {
|
||||
if (!finished && data.choices[0]?.finish_reason) {
|
||||
if (data.choices[0]?.finish_reason) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user