'commit'
This commit is contained in:
@@ -40,11 +40,15 @@ class LLMClient:
|
||||
if chunk and chunk.choices and len(chunk.choices) > 0:
|
||||
delta = chunk.choices[0].delta
|
||||
if delta and delta.content and delta.content.strip():
|
||||
# 添加控制台打印输出
|
||||
print(f"[LLM Stream] 接收到内容片段: {delta.content.strip()}")
|
||||
yield delta.content
|
||||
else:
|
||||
if completion and completion.choices and len(completion.choices) > 0:
|
||||
message = completion.choices[0].message
|
||||
if message and message.content and message.content.strip():
|
||||
# 添加控制台打印输出
|
||||
print(f"[LLM Response] 接收到完整内容: {message.content.strip()[:100]}...") # 仅打印前100字符
|
||||
yield message.content
|
||||
|
||||
except Exception as e:
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user