nat.front_ends.fastapi.routes.chat#
OpenAI-compatible chat route registration.
Classes#
Enum where members are also (and must be) strings |
|
Enum where members are also (and must be) strings |
Functions#
|
|
|
Add OpenAI-compatible chat routes for an endpoint. |
Module Contents#
- class _ChatEndpointType#
Bases:
enum.StrEnumEnum where members are also (and must be) strings
Initialize self. See help(type(self)) for accurate signature.
- SINGLE = 'single'#
- STREAMING = 'streaming'#
- class _ChatEndpointMethod#
Bases:
enum.StrEnumEnum where members are also (and must be) strings
Initialize self. See help(type(self)) for accurate signature.
- GET = 'GET'#
- POST = 'POST'#
- _add_chat_route(
- app: fastapi.FastAPI,
- worker: Any,
- endpoint_path: str,
- session_manager: nat.runtime.session.SessionManager,
- endpoint_type: _ChatEndpointType,
- endpoint_method: _ChatEndpointMethod,
- endpoint_description: str,
- enable_interactive: bool,
- async add_chat_routes(
- worker: Any,
- app: fastapi.FastAPI,
- endpoint: Any,
- session_manager: nat.runtime.session.SessionManager,
- *,
- enable_interactive_extensions: bool = False,
- disable_legacy_routes: bool = False,
Add OpenAI-compatible chat routes for an endpoint.