In memory document index.
Callback manager for retriever run.
Class for storing a piece of text and associated metadata.
Document is for retrieval workflows, not chat I/O. For sending text
to an LLM in a conversation, use message types from langchain.messages.
A generic response for upsert operations.
The upsert response will be used by abstractions that implement an upsert operation for content that can be upserted by ID.
Upsert APIs that accept inputs with IDs and generate IDs internally will return a response that includes the IDs that succeeded and the IDs that failed.
If there are no failures, the failed list will be empty, and the order of the IDs in the succeeded list will match the order of the input documents.
If there are failures, the response becomes ill defined, and a user of the API cannot determine which generated ID corresponds to which input document.
It is recommended for users explicitly attach the IDs to the items being indexed to avoid this issue.
A generic response for delete operation.
The fields in this response are optional and whether the VectorStore
returns them or not is up to the implementation.
A document retriever that supports indexing operations.
This indexing interface is designed to be a generic abstraction for storing and querying documents that has an ID and metadata associated with it.
The interface is designed to be agnostic to the underlying implementation of the indexing system.
The interface is designed to support the following operations:
In memory document index.
This is an in-memory document index that stores documents in a dictionary.
It provides a simple search API that returns documents by the number of counts the given query appears in the document.