mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 00:46:22 +02:00
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:
parent
52ca74bbbc
commit
664bce6182
9 changed files with 234 additions and 58 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue