mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 03:46:52 +08:00
fix(openai_api_compatible): fixing the error when converting chunk to json (#3570)
This commit is contained in:
@@ -425,6 +425,7 @@ class OAIAPICompatLargeLanguageModel(_CommonOAI_API_Compat, LargeLanguageModel):
|
|||||||
finish_reason = 'Unknown'
|
finish_reason = 'Unknown'
|
||||||
|
|
||||||
for chunk in response.iter_lines(decode_unicode=True, delimiter=delimiter):
|
for chunk in response.iter_lines(decode_unicode=True, delimiter=delimiter):
|
||||||
|
chunk = chunk.strip()
|
||||||
if chunk:
|
if chunk:
|
||||||
# ignore sse comments
|
# ignore sse comments
|
||||||
if chunk.startswith(':'):
|
if chunk.startswith(':'):
|
||||||
|
|||||||
Reference in New Issue
Block a user