- class langgraph_agent_toolkit.service.factory.ServiceRunner(custom_settings=None)[source][source]
Bases:
object
A factory class to run the API service in different ways.
This class provides methods to run the service with different runners: - With Uvicorn - With Gunicorn - With Mangum (AWS Lambda) - With Azure Functions
Initialize the ServiceRunner.
- Parameters:
custom_settings (Dict[str, Any] | None) – Optional dictionary of settings to override the default settings.
- run_gunicorn(**kwargs)[source][source]
Run the API service with gunicorn.
- Parameters:
**kwargs – Additional arguments to pass to gunicorn
- run(runner_type=RunnerType.UVICORN, **kwargs)[source][source]
Run the API service with the specified runner type.
- Parameters:
runner_type (RunnerType) – The type of runner to use.
**kwargs – Additional arguments to pass to the runner.