Skip to content

Commit 6212aab

Browse files
committed
address comment
1 parent 5af7c25 commit 6212aab

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/runloop_api_client/sdk/async_axon.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class AsyncAxon:
2626
>>> runloop = AsyncRunloopSDK()
2727
>>> axon = await runloop.axon.create()
2828
>>> await axon.publish(event_type="task_done", origin="AGENT_EVENT", payload="{}", source="my-agent")
29+
>>> async with await axon.subscribe_sse() as stream:
30+
... async for event in stream:
31+
... print(event.event_type, event.payload)
2932
"""
3033

3134
def __init__(self, client: AsyncRunloop, axon_id: str) -> None:

src/runloop_api_client/sdk/axon.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class Axon:
2626
>>> runloop = RunloopSDK()
2727
>>> axon = runloop.axon.create()
2828
>>> axon.publish(event_type="task_done", origin="AGENT_EVENT", payload="{}", source="my-agent")
29+
>>> with axon.subscribe_sse() as stream:
30+
... for event in stream:
31+
... print(event.event_type, event.payload)
2932
"""
3033

3134
def __init__(self, client: Runloop, axon_id: str) -> None:

0 commit comments

Comments
 (0)