Changed API gateway and SDK

This commit is contained in:
Cyber MacGeddon 2026-04-12 15:55:13 +01:00
parent 4930bc4d2b
commit 1630346bd9
7 changed files with 96 additions and 30 deletions

View file

@ -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