File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff 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
@@ -731,7 +742,7 @@ async def generated_image_to_input(
731742 self , item : GeneratedImageItem
732743 ) -> TResponseInputItem | list [TResponseInputItem ] | None :
733744 """
734- Convert a GeneratedImageItem into a message content part to send to the model.
745+ Convert a GeneratedImageItem into input item(s) to send to the model.
735746 Required when generated images are enabled.
736747 """
737748 raise NotImplementedError (
You can’t perform that action at this time.
0 commit comments