Fix non streaming RAG problems (#607)

* Fix non-streaming failure in RAG services

* Fix non-streaming failure in API

* Fix agent non-streaming messaging

* Agent messaging unit & contract tests
This commit is contained in:
cybermaggedon 2026-01-12 18:45:52 +00:00 committed by GitHub
parent 30ca1d2e8b
commit 807f6cc4e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 677 additions and 21 deletions

View file

@ -48,13 +48,13 @@ class AgentService(FlowProcessor):
async def on_request(self, msg, consumer, flow):
# Get ID early so error handler can use it
id = msg.properties().get("id", "unknown")
try:
request = msg.value()
# Sender-produced ID
id = msg.properties()["id"]
async def respond(resp):
await flow("response").send(
@ -93,6 +93,8 @@ class AgentService(FlowProcessor):
thought = None,
observation = None,
answer = None,
end_of_message = True,
end_of_dialog = True,
),
properties={"id": id}
)