yipao.retrievers.VectorStoreRetriever¶
- class yipao.retrievers.VectorStoreRetriever(vectorstore, n_results, name_collection)[source]¶
A class that retrieves related data definition language (DDL) statements from a vectorstore based on a query.
- vectorstore¶
The vector store where DDLs are stored and queried.
- n_results¶
The number of query results to return.
- Type:
int
- __init__(vectorstore, n_results, name_collection)[source]¶
Initializes the VectorStoreRetriever with a specified vectorstore and the number of results to retrieve.
- Parameters:
vectorstore – The vector store to use for retrieving DDLs.
n_results (int) – The number of results to return per query.
Methods
__init__
(vectorstore, n_results, name_collection)Initializes the VectorStoreRetriever with a specified vectorstore and the number of results to retrieve.
get_related_ddl
(question)Queries the vectorstore for related DDL statements based on the provided question.