@@ -252,7 +252,7 @@ class MoonshotLargeLanguageModel(OAIAPICompatLargeLanguageModel):
# ignore sse comments
if chunk.startswith(":"):
continue
- decoded_chunk = chunk.strip().removeprefix("data: ")
+ decoded_chunk = chunk.strip().removeprefix("data:").lstrip()
chunk_json = None
try:
chunk_json = json.loads(decoded_chunk)
@@ -479,7 +479,7 @@ class OAIAPICompatLargeLanguageModel(_CommonOaiApiCompat, LargeLanguageModel):
if decoded_chunk == "[DONE]": # Some provider returns "data: [DONE]"
@@ -250,7 +250,7 @@ class StepfunLargeLanguageModel(OAIAPICompatLargeLanguageModel):