nat.runtime.session#
Attributes#
Classes#
The SessionManager class is used to run and manage a user workflow session. It runs and manages the context, |
Module Contents#
- _T#
- class UserManagerBase#
- class SessionManager(
- workflow: nat.builder.workflow.Workflow,
- max_concurrency: int = 8,
The SessionManager class is used to run and manage a user workflow session. It runs and manages the context, and configuration of a workflow with the specified concurrency.
Parameters#
- workflowWorkflow
The workflow to run
- max_concurrencyint, optional
The maximum number of simultaneous workflow invocations, by default 8
- _workflow: nat.builder.workflow.Workflow#
- _max_concurrency = 8#
- _context_state#
- _context#
- _saved_context#
- property config: nat.data_models.config.Config#
- property workflow: nat.builder.workflow.Workflow#
- property context: nat.builder.context.Context#
- async session(
- user_manager=None,
- request: starlette.requests.HTTPConnection | None = None,
- conversation_id: str | None = None,
- user_input_callback: collections.abc.Callable[[nat.data_models.interactive.InteractionPrompt], collections.abc.Awaitable[nat.data_models.interactive.HumanResponse]] = None,
- user_authentication_callback: collections.abc.Callable[[nat.data_models.authentication.AuthProviderBaseConfig, nat.data_models.authentication.AuthFlowType], collections.abc.Awaitable[nat.data_models.authentication.AuthenticatedContext | None]] = None,
- async run(message)#
Start a workflow run
- AIQSessionManager#