Skip to content

Commit

Permalink
[Small model] Explicitly close AsyncGenerator (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishig authored Jan 17, 2024
1 parent 50e0ab9 commit 01418cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/server/generateFromDefaultEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export async function generateFromDefaultEndpoint({
generated_text = generated_text.slice(0, -stop.length).trimEnd();
}
}
tokenStream.return();
return generated_text;
}
}
Expand Down

0 comments on commit 01418cd

Please sign in to comment.