From b34c29ad152cfef99d1e843af34370d3ce2d613f Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Tue, 6 Jan 2026 19:47:06 +0000 Subject: [PATCH] Updated streaming tests --- trustgraph-base/trustgraph/base/prompt_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trustgraph-base/trustgraph/base/prompt_client.py b/trustgraph-base/trustgraph/base/prompt_client.py index 370cf78a..74b25132 100644 --- a/trustgraph-base/trustgraph/base/prompt_client.py +++ b/trustgraph-base/trustgraph/base/prompt_client.py @@ -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: