servers.get_router

servers.get_router(vector_stores, endpoint_names)

Create and return a FastAPI APIRouter with search endpoints.

Parameters

Name Type Description Default
vector_stores list[VectorStore] A list of VectorStore objects, each responsible for handling embedding and search operations for a specific endpoint. required
endpoint_names list[str] Endpoint names corresponding to the vector stores. required

Returns

Name Type Description
APIRouter fastapi.APIRouter: Router with initialized search endpoints.

Raises

Name Type Description
DataValidationError If the input parameters are invalid.
ConfigurationError If one or more vector stores are invalid.