This commit is contained in:
Paul Gauthier 2023-09-01 15:52:56 -07:00
parent 427c9129a4
commit 0de722a7b3
8 changed files with 50 additions and 42 deletions

View file

@ -629,7 +629,10 @@ class Coder:
if len(chunk.choices) == 0:
continue
if hasattr(chunk.choices[0], "finish_reason") and chunk.choices[0].finish_reason == "length":
if (
hasattr(chunk.choices[0], "finish_reason")
and chunk.choices[0].finish_reason == "length"
):
raise ExhaustedContextWindow()
try: