This commit is contained in:
Paul Gauthier 2023-09-01 15:53:19 -07:00
parent 30a3cc0847
commit 1334392418
8 changed files with 49 additions and 41 deletions

View file

@ -636,7 +636,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: