File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
api/core/model_runtime/model_providers
openai_api_compatible/llm Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ def get_tool_call(tool_name: str):
252252 # ignore sse comments
253253 if chunk .startswith (":" ):
254254 continue
255- decoded_chunk = chunk .strip ().lstrip ("data: " ). lstrip ( )
255+ decoded_chunk = chunk .strip ().removeprefix ("data: " )
256256 chunk_json = None
257257 try :
258258 chunk_json = json .loads (decoded_chunk )
Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ def get_tool_call(tool_call_id: str):
462462 # ignore sse comments
463463 if chunk .startswith (":" ):
464464 continue
465- decoded_chunk = chunk .strip ().lstrip ("data: " ). lstrip ( )
465+ decoded_chunk = chunk .strip ().removeprefix ("data: " )
466466 if decoded_chunk == "[DONE]" : # Some provider returns "data: [DONE]"
467467 continue
468468
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ def get_tool_call(tool_name: str):
250250 # ignore sse comments
251251 if chunk .startswith (":" ):
252252 continue
253- decoded_chunk = chunk .strip ().lstrip ("data: " ). lstrip ( )
253+ decoded_chunk = chunk .strip ().removeprefix ("data: " )
254254 chunk_json = None
255255 try :
256256 chunk_json = json .loads (decoded_chunk )
You can’t perform that action at this time.
0 commit comments