Skip to content

Commit

Permalink
Handle situation where choices.length === 0 in a better way: OpenRo…
Browse files Browse the repository at this point in the history
…uter made some changes to accommodate tool call responses, this is a side effect
  • Loading branch information
zakkor committed Aug 28, 2024
1 parent c3c5a73 commit ff1fa2e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,7 @@
saveMessage(convo.messages[i]);
} else {
if (chunk.choices.length === 0) {
convo.messages[i].error = 'Refused to respond.';
generating = false;
saveMessage(convo.messages[i]);
return;
}
Expand Down

0 comments on commit ff1fa2e

Please sign in to comment.