Document compressor.
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.
Base class for document compressors.
This abstraction is primarily used for post-processing of retrieved documents.
Document objects matching a given query are first retrieved.
Then the list of documents can be further processed.
For example, one could re-rank the retrieved documents using an LLM.
Users should favor using a RunnableLambda instead of sub-classing from this
interface.