autogen_agentchat.ui#
- async Console(stream: AsyncGenerator[Annotated[TextMessage | MultiModalMessage | StopMessage | HandoffMessage | ToolCallMessage | ToolCallResultMessage, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | T, None], *, no_inline_images: bool = False) T [source]#
Consumes the message stream from
run_stream()
oron_messages_stream()
and renders the messages to the console. Returns the last processed TaskResult or Response.- Parameters:
stream (AsyncGenerator[AgentMessage | TaskResult, None] | AsyncGenerator[AgentMessage | Response, None]) – Message stream to render. This can be from
run_stream()
oron_messages_stream()
.no_inline_images (bool, optional) – If terminal is iTerm2 will render images inline. Use this to disable this behavior. Defaults to False.
- Returns:
last_processed – A
TaskResult
if the stream is fromrun_stream()
or aResponse
if the stream is fromon_messages_stream()
.