mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Update to add streaming tests (#600)
This commit is contained in:
parent
f0c95a4c5e
commit
f79d0603f7
9 changed files with 1062 additions and 57 deletions
|
|
@ -51,7 +51,8 @@ class PromptClient(RequestResponse):
|
|||
|
||||
end_stream = getattr(resp, 'end_of_stream', False)
|
||||
|
||||
if resp.text:
|
||||
# Always call callback if there's text OR if it's the final message
|
||||
if resp.text is not None:
|
||||
last_text = resp.text
|
||||
# Call chunk callback if provided with both chunk and end_of_stream flag
|
||||
if chunk_callback:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue