io
autogen.io.IOConsole
IOConsole
A console input/output stream.
Static Methods
get_default
Get the default input/output stream.
Returns:
IOStream: The default input/output stream.
Type | Description |
---|---|
IOStream | IOStream: The default input/output stream. |
get_global_default
Get the default input/output stream.
Returns:
IOStream: The default input/output stream.
Type | Description |
---|---|
IOStream | IOStream: The default input/output stream. |
set_default
Set the default input/output stream.
Name | Description |
---|---|
stream | The input/output stream to set as the default. Type: ForwardRef(‘IOStream’) | None |
set_global_default
Set the default input/output stream.
Name | Description |
---|---|
stream | The input/output stream to set as the default. Type: IOStream |
Instance Methods
input
Read a line from the input stream.
Name | Description |
---|---|
prompt | The prompt to display. Defaults to "". Type: str Default: ” |
password | Whether to read a password. Defaults to False. Type: bool Default: False |
Type | Description |
---|---|
str | str: The line read from the input stream. |
Print data to the output stream.
Name | Description |
---|---|
*objects | Type: Any |
sep | The separator between objects. Defaults to ” ”. Type: str Default: ’ ‘ |
end | The end of the output. Defaults to “ Type: str Default: ‘\n’ |
flush | Whether to flush the output. Defaults to False. Type: bool Default: False |
send
Send a message to the output stream.
Name | Description |
---|---|
message | The message to send. Type: BaseMessage |