VectorDBBlock
MemoryBlock abstract base class for
maintaining and retrieving information using vector embeddings within a
vector database.
Parameters:
- storage (Optional[BaseVectorStorage], optional): The storage mechanism for the vector database. Defaults to in-memory :obj:
Qdrantif not provided. (default: :obj:None) - embedding (Optional[BaseEmbedding], optional): Embedding mechanism to convert chat messages into vector representations. Defaults to :obj:
OpenAiEmbeddingif not provided. (default: :obj:None)
init
retrieve
- keyword (str): This string will be converted into a vector representation to query the database.
- limit (int, optional): The maximum number of similar messages to retrieve. (default: :obj:
3).
current_state.
write_records
- records (List[MemoryRecord]): Memory records to be added to the memory.