Merge pull request #177 from h0x91b/h0x91b-patch-1

Update base_coder.py
This commit is contained in:
paul-gauthier 2023-08-08 07:37:51 -03:00 committed by GitHub
commit 6a88d0f2b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -653,6 +653,10 @@ class Coder:
live.start()
for chunk in completion:
text = ''
if len(chunk.choices) == 0:
continue
if chunk.choices[0].finish_reason == "length":
raise ExhaustedContextWindow()