fix(openai_api_compatible): fixing the error when converting chunk to json (#3570)
This commit is contained in:
parent
4365843c20
commit
aa6d2e3035
1 changed files with 2 additions and 1 deletions
|
|
@ -425,6 +425,7 @@ class OAIAPICompatLargeLanguageModel(_CommonOAI_API_Compat, LargeLanguageModel):
|
|||
finish_reason = 'Unknown'
|
||||
|
||||
for chunk in response.iter_lines(decode_unicode=True, delimiter=delimiter):
|
||||
chunk = chunk.strip()
|
||||
if chunk:
|
||||
# ignore sse comments
|
||||
if chunk.startswith(':'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue