mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-12 08:15:14 +02:00
Changed API gateway and SDK
This commit is contained in:
parent
4930bc4d2b
commit
1630346bd9
7 changed files with 96 additions and 30 deletions
|
|
@ -28,12 +28,12 @@ def query(url, flow_id, system, prompt, streaming=True, token=None):
|
|||
if streaming:
|
||||
# Stream output to stdout without newline
|
||||
for chunk in response:
|
||||
print(chunk, end="", flush=True)
|
||||
print(chunk.content, end="", flush=True)
|
||||
# Add final newline after streaming
|
||||
print()
|
||||
else:
|
||||
# Non-streaming: print complete response
|
||||
print(response)
|
||||
print(response.text)
|
||||
|
||||
finally:
|
||||
# Clean up socket connection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue