Skip to content

Commit d169b14

Browse files
committed
Add docstring
1 parent be9f49f commit d169b14

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

chatkit/agents.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,18 @@ async def stream_agent_response(
367367
*,
368368
base64_to_generated_image: Callable[[str], Awaitable[GeneratedImage]] | None = None,
369369
) -> AsyncIterator[ThreadStreamEvent]:
370-
"""Convert a streamed Agents SDK run into ChatKit ThreadStreamEvents."""
370+
"""Convert a streamed Agents SDK run into ChatKit ThreadStreamEvents.
371+
372+
Args:
373+
context: The AgentContext to use for the stream.
374+
result: The RunResultStreaming to convert.
375+
base64_to_generated_image: A callable to convert a base64-encoded image generation result
376+
to a GeneratedImage. If not provided, the generated base64 image data will be saved
377+
as part of the GeneratedImageItem.
378+
379+
Returns:
380+
An async iterator that yields thread stream events representing the run result.
381+
"""
371382
current_item_id = None
372383
current_tool_call = None
373384
ctx = context

0 commit comments

Comments
 (0)