MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / responses_sse

Function responses_sse

uncommon_route/proxy.py:5878–5887  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5876 )
5877
5878 async def responses_sse() -> AsyncGenerator[bytes, None]:
5879 async for chunk in upstream_resp.body_iterator:
5880 adapter.feed(chunk)
5881 events, assistant_message = adapter.finalize()
5882 if assistant_message is not None:
5883 _responses_history[response_id] = json.loads(
5884 json.dumps(chat_messages + [assistant_message])
5885 )
5886 for event in events:
5887 yield event
5888
5889 headers = {
5890 key: value

Callers 1

handle_responsesFunction · 0.85

Calls 2

finalizeMethod · 0.80
feedMethod · 0.45

Tested by

no test coverage detected