The RestExecutor is a specialized subclass of the Executor base class designed to handle REST applications. It encapsulates all necessary parameters for configuring and running a REST-based application.
Constructor
RestExecutor(sources, indices, queries, vector_database, endpoint_configuration=None, context_data=None, blob_handler_config=None)
Parameters
sources
Sequence[RestSource | DataLoaderSource]
required
Sources, either RestSource or DataLoaderSource.
Indices for the RestExecutor.
queries
Sequence[RestQuery]
required
Queries to execute.
Vector database instance.
endpoint_configuration
RestEndpointConfiguration | None
default:"None"
REST endpoint configuration. Defaults to None.
context_data
Mapping[str, Mapping[str, ContextValue]] | None
default:"None"
Context data for execution. Defaults to None.
blob_handler_config
BlobHandlerConfig | None
default:"None"
Blob handler configuration. Defaults to None.
Inheritance
Inheritance Chain:
RestExecutor
- →
Executor
- →
ABC
- →
Generic
Methods
run()
Run the RestExecutor. It returns an app that will create rest endpoints.
Returns: An instance of RestApp.