IONats
fastagency.studio.io.ionats.IONats #
Bases: IOStream
Initialize the IO class.
Source code in fastagency/studio/io/ionats.py
create async
classmethod
#
create(
user_id: Union[str, UUID],
thread_id: Union[str, UUID],
deployment_id: Optional[
Union[str, UUID]
] = "playground",
) -> IONats
Source code in fastagency/studio/io/ionats.py
handle_input async
#
handle_input(
body: InputResponseModel,
msg: NatsMessage,
logger: Logger,
) -> None
input #
Read a line from the input stream.
PARAMETER | DESCRIPTION |
---|---|
prompt | The prompt to display. Defaults to "". TYPE: |
password | Whether to read a password. Defaults to False. TYPE: |
RETURNS | DESCRIPTION |
---|---|
str | The line read from the input stream. TYPE: |
Source code in fastagency/studio/io/ionats.py
print #
Print data to the output stream.
PARAMETER | DESCRIPTION |
---|---|
objects | The data to print. TYPE: |
sep | The separator between objects. Defaults to " ". TYPE: |
end | The end of the output. Defaults to "\n". TYPE: |
flush | Whether to flush the output. Defaults to False. TYPE: |