langchain_experimental.retrievers.vector_sql_database.VectorSQLDatabaseChainRetriever¶
class langchain_experimental.retrievers.vector_sql_database.VectorSQLDatabaseChainRetriever[source]¶
Bases: BaseRetriever
Retriever that uses SQLDatabase as Retriever
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param metadata: Optional[Dict[str, Any]] = None¶
Optional metadata associated with the retriever. Defaults to None
This metadata will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a retriever with its
use case.
param page_content_key: str = 'content'¶
column name for page content of documents
param sql_db_chain: langchain_experimental.sql.vector_sql.VectorSQLDatabaseChain [Required]¶
SQL Database Chain
param tags: Optional[List[str]] = None¶
Optional list of tags associated with the retriever. Defaults to None
These tags will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a retriever with its
use case.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation runs ainvoke in parallel using asyncio.gather.
The default implementation of batch works well for IO bound runnables.
Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.