Fix Python streaming SDK issues (#580)

* Fix verify CLI issues

* Fixing content mechanisms in API

* Fixing error handling

* Fixing invoke_prompt, invoke_llm, invoke_agent
This commit is contained in:
cybermaggedon 2025-12-04 20:42:25 +00:00 committed by GitHub
parent 52ca74bbbc
commit 664bce6182
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 234 additions and 58 deletions

View file

@ -161,6 +161,11 @@ def question(
# Output the chunk
if current_outputter:
current_outputter.output(content)
# Flush word buffer after each chunk to avoid delay
if current_outputter.word_buffer:
print(current_outputter.word_buffer, end="", flush=True)
current_outputter.column += len(current_outputter.word_buffer)
current_outputter.word_buffer = ""
elif chunk_type == "final-answer":
print(content, end="", flush=True)