aiq.builder.user_interaction_manager#
Classes#
AIQUserInteractionManager is responsible for requesting user input |
Module Contents#
- class AIQUserInteractionManager(context_state: AIQContextState)#
AIQUserInteractionManager is responsible for requesting user input at runtime. It delegates the actual prompting to a callback function stored in AIQContextState.user_input_callback.
Type is not imported in __init__ to prevent partial import.
- _context_state#
- static default_callback_handler( ) aiq.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: aiq.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 AIQSessionManager.
Returns the user’s typed-in answer as a string.