Add Native Precision Tutorial, update worker strategy and README.md (#1807)

This commit is contained in:
Oql 2026-01-23 18:00:13 +08:00 committed by GitHub
parent 8652346e69
commit bf4c8a690b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 308 additions and 2 deletions

View file

@ -270,6 +270,7 @@ def _stream_response(
) -> str:
"""Generate streaming response and display in real-time."""
response_content = ""
reasoning_content = ""
try:
stream = client.chat.completions.create(
@ -281,8 +282,13 @@ def _stream_response(
)
for chunk in stream:
if chunk.choices[0].delta.content:
content = chunk.choices[0].delta.content
delta = chunk.choices[0].delta
reasoning_delta = getattr(delta, "reasoning_content", None)
if reasoning_delta:
reasoning_content += reasoning_delta
console.print(reasoning_delta, end="", style="dim")
if delta.content:
content = delta.content
response_content += content
console.print(content, end="")