nat.utils#
Submodules#
- nat.utils.callable_utils
- nat.utils.data_models
- nat.utils.debugging_utils
- nat.utils.decorators
- nat.utils.dump_distro_mapping
- nat.utils.exception_handlers
- nat.utils.io
- nat.utils.log_levels
- nat.utils.log_utils
- nat.utils.metadata_utils
- nat.utils.optional_imports
- nat.utils.producer_consumer_queue
- nat.utils.reactive
- nat.utils.responses_api
- nat.utils.settings
- nat.utils.string_utils
- nat.utils.type_converter
- nat.utils.type_utils
- nat.utils.url_utils
Attributes#
Functions#
|
Wrapper to run a workflow given either a config or a config file path and a prompt, returning the result in the |
Package Contents#
- _T#
- async run_workflow(
- *,
- config: Config | None = None,
- config_file: StrPath | None = None,
- prompt: str,
- to_type: type[_T] = str,
- session_kwargs: dict[str, Any] | None = None,
Wrapper to run a workflow given either a config or a config file path and a prompt, returning the result in the type specified by the
to_type.Parameters#
- configConfig | None
The configuration object to use for the workflow. If None, config_file must be provided.
- config_fileStrPath | None
The path to the configuration file. If None, config must be provided. Can be either a str or a Path object.
- promptstr
The prompt to run the workflow with.
- to_typetype[_T]
The type to convert the result to. Default is str.
Returns#
- _T
The result of the workflow converted to the specified type.