nat.builder.user_interaction_manager#
Attributes#
Classes#
UserInteractionManager is responsible for requesting user input |
Module Contents#
- logger#
- class UserInteractionManager(context_state: ContextState)#
UserInteractionManager is responsible for requesting user input at runtime. It delegates the actual prompting to a callback function stored in ContextState.user_input_callback.
Type is not imported in __init__ to prevent partial import.
- _context_state#
- static default_callback_handler( ) nat.data_models.interactive.HumanResponse #
- Abstractmethod:
- Async:
Default callback handler for user input. This is a no-op function that simply returns the input text from the Interaction Content object.
- Args:
prompt (InteractionPrompt): The interaction to process.
- async prompt_user_input(
- content: nat.data_models.interactive.HumanPrompt,
Ask the user a question and wait for input. This calls out to the callback from user_input_callback, which is typically set by SessionManager.
Returns the user’s typed-in answer as a string.
- AIQUserInteractionManager#