id stringlengths 14 15 | text stringlengths 44 2.47k | source stringlengths 61 181 |
|---|---|---|
747b6355a001-0 | langchain.retrievers.milvus.MilvusRetriever¶
class langchain.retrievers.milvus.MilvusRetriever[source]¶
Bases: BaseRetriever
Milvus API 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 collec... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
747b6355a001-1 | Default implementation of abatch, which calls ainvoke N times.
Subclasses should override this method if they can batch more efficiently.
add_texts(texts: List[str], metadatas: Optional[List[dict]] = None) → None[source]¶
Add text to the Milvus store
Parameters
texts (List[str]) – The text
metadatas (List[dict]) – Meta... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
747b6355a001-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
747b6355a001-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
747b6355a001-4 | namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
747b6355a001-5 | classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a list of strings that describes the path
to the object.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a list of inputs to a list of outputs,
by calling invoke() with e... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
747b6355a001-6 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html |
a211d6b6ce6d-0 | langchain.retrievers.self_query.redis.RedisTranslator¶
class langchain.retrievers.self_query.redis.RedisTranslator(schema: RedisModel)[source]¶
Translate
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical operators.
Methods
__init__(schema)
from_vectorstore... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.redis.RedisTranslator.html |
a632d7e8c475-0 | langchain.retrievers.zilliz.ZillizRetriever¶
class langchain.retrievers.zilliz.ZillizRetriever[source]¶
Bases: BaseRetriever
Zilliz API 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 collec... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
a632d7e8c475-1 | 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 of abatch, which calls ainvoke N times.
Subclasses should override this method if they can batch more effi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
a632d7e8c475-2 | Subclasses should override this method if they can run asynchronously.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
a... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
a632d7e8c475-3 | Subclasses should override this method if they can batch more efficiently.
bind(**kwargs: Any) → Runnable[Input, Output]¶
Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ fr... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
a632d7e8c475-4 | classmethod from_orm(obj: Any) → Model¶
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optiona... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
a632d7e8c475-5 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
a632d7e8c475-6 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
7a8dd4ab2273-0 | langchain.retrievers.self_query.timescalevector.TimescaleVectorTranslator¶
class langchain.retrievers.self_query.timescalevector.TimescaleVectorTranslator[source]¶
Translate the internal query language elements to valid filters.
Attributes
COMPARATOR_MAP
OPERATOR_MAP
allowed_comparators
allowed_operators
Subset of allo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.timescalevector.TimescaleVectorTranslator.html |
92957e97ff68-0 | langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor¶
class langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor[source]¶
Bases: BaseDocumentCompressor
Document compressor that uses an LLM chain to extract
the relevant parts of documents.
Create a new model by parsing and valid... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor.html |
92957e97ff68-1 | Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creat... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor.html |
92957e97ff68-2 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor.html |
dd3f26a91ca4-0 | langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever¶
class langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever[source]¶
Bases: BaseRetriever
ChatGPT plugin retriever.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input dat... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
dd3f26a91ca4-1 | Default implementation of abatch, which calls ainvoke N times.
Subclasses should override this method if they can batch more efficiently.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None,... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
dd3f26a91ca4-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
dd3f26a91ca4-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
dd3f26a91ca4-4 | namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
dd3f26a91ca4-5 | classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a list of strings that describes the path
to the object.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a list of inputs to a list of outputs,
by calling invoke() with e... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
dd3f26a91ca4-6 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
d13c92d790c3-0 | langchain.retrievers.self_query.qdrant.QdrantTranslator¶
class langchain.retrievers.self_query.qdrant.QdrantTranslator(metadata_key: str)[source]¶
Translate Qdrant internal query language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Methods
__init__(... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.qdrant.QdrantTranslator.html |
613013c70477-0 | langchain.retrievers.svm.create_index¶
langchain.retrievers.svm.create_index(contexts: List[str], embeddings: Embeddings) → ndarray[source]¶
Create an index of embeddings for a list of contexts.
Parameters
contexts – List of contexts to embed.
embeddings – Embeddings model to use.
Returns
Index of embeddings. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.create_index.html |
6f6a4a6c837f-0 | langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter¶
class langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter[source]¶
Bases: BaseDocumentCompressor
Document compressor that uses embeddings to drop documents
unrelated to the query.
Create a new model by parsing and val... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter.html |
6f6a4a6c837f-1 | Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter.html |
6f6a4a6c837f-2 | classmethod from_orm(obj: Any) → Model¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_n... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter.html |
b3ec2fc97e68-0 | langchain.retrievers.self_query.myscale.MyScaleTranslator¶
class langchain.retrievers.self_query.myscale.MyScaleTranslator(metadata_key: str = 'metadata')[source]¶
Translate MyScale internal query language elements to valid filters.
Attributes
allowed_comparators
allowed_operators
Subset of allowed logical operators.
m... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.myscale.MyScaleTranslator.html |
2c5a2481f851-0 | langchain.retrievers.remote_retriever.RemoteLangChainRetriever¶
class langchain.retrievers.remote_retriever.RemoteLangChainRetriever[source]¶
Bases: BaseRetriever
LangChain API retriever.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be p... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
2c5a2481f851-1 | param url: str [Required]¶
URL of the remote LangChain API.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation of abatch, which calls ainvoke N times.
Subclasses shoul... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
2c5a2481f851-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
2c5a2481f851-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
2c5a2481f851-4 | namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
2c5a2481f851-5 | classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a list of strings that describes the path
to the object.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a list of inputs to a list of outputs,
by calling invoke() with e... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
2c5a2481f851-6 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.remote_retriever.RemoteLangChainRetriever.html |
7f0ae3efc504-0 | langchain.retrievers.kendra.ResultItem¶
class langchain.retrievers.kendra.ResultItem[source]¶
Bases: BaseModel, ABC
Base class of a result item.
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 Document... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.ResultItem.html |
7f0ae3efc504-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.ResultItem.html |
7f0ae3efc504-2 | classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.ResultItem.html |
1a3571d16255-0 | langchain.retrievers.docarray.DocArrayRetriever¶
class langchain.retrievers.docarray.DocArrayRetriever[source]¶
Bases: BaseRetriever
DocArray Document Indices retriever.
Currently, it supports 5 backends:
InMemoryExactNNIndex, HnswDocumentIndex, QdrantDocumentIndex,
ElasticDocIndex, and WeaviateDocumentIndex.
Parameter... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-1 | 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 cas... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-2 | Subclasses should override this method if they can run asynchronously.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
a... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-3 | Subclasses should override this method if they can batch more efficiently.
bind(**kwargs: Any) → Runnable[Input, Output]¶
Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ fr... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-4 | classmethod from_orm(obj: Any) → Model¶
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optiona... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-5 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-6 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
1a3571d16255-7 | Examples using DocArrayRetriever¶
DocArray Retriever | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
6535da865ef4-0 | langchain.retrievers.multi_query.LineListOutputParser¶
class langchain.retrievers.multi_query.LineListOutputParser[source]¶
Bases: PydanticOutputParser
Output parser for a list of lines.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be pa... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
6535da865ef4-1 | to be different candidate outputs for a single model input.
Returns
Structured output.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support str... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
6535da865ef4-2 | Default implementation of batch, which calls invoke N times.
Subclasses should override this method if they can batch more efficiently.
bind(**kwargs: Any) → Runnable[Input, Output]¶
Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Mode... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
6535da865ef4-3 | namespace is [“langchain”, “llms”, “openai”]
invoke(input: Union[str, BaseMessage], config: Optional[RunnableConfig] = None) → T¶
classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
6535da865ef4-4 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
parse_result(result: List[Generation], *, partial: bool = False) → T¶
Parse a list of candidate model Generations... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
6535da865ef4-5 | to_json_not_implemented() → SerializedNotImplemented¶
transform(input: Iterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶
Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
6535da865ef4-6 | For example,{“openai_api_key”: “OPENAI_API_KEY”}
property output_schema: Type[pydantic.main.BaseModel]¶ | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html |
2eeb270498c5-0 | langchain.retrievers.tfidf.TFIDFRetriever¶
class langchain.retrievers.tfidf.TFIDFRetriever[source]¶
Bases: BaseRetriever
TF-IDF retriever.
Largely based on
https://github.com/asvskartheek/Text-Retrieval/blob/master/TF-IDF%20Search%20Engine%20(SKLEARN).ipynb
Create a new model by parsing and validating input data from k... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-1 | Default implementation of abatch, which calls ainvoke N times.
Subclasses should override this method if they can batch more efficiently.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None,... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-4 | classmethod from_orm(obj: Any) → Model¶
classmethod from_texts(texts: Iterable[str], metadatas: Optional[Iterable[dict]] = None, tfidf_params: Optional[Dict[str, Any]] = None, **kwargs: Any) → TFIDFRetriever[source]¶
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-5 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-6 | classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
stream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
2eeb270498c5-7 | with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶
property InputType: Type[langchain.schema.runnable.utils.Input]¶
property OutputType: Type[langchain.schema.runna... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.tfidf.TFIDFRetriever.html |
479d39cb95df-0 | langchain.retrievers.self_query.chroma.ChromaTranslator¶
class langchain.retrievers.self_query.chroma.ChromaTranslator[source]¶
Translate Chroma internal query language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical operators.... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.chroma.ChromaTranslator.html |
36c1890b1703-0 | langchain.retrievers.self_query.vectara.VectaraTranslator¶
class langchain.retrievers.self_query.vectara.VectaraTranslator[source]¶
Translate Vectara internal query language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical opera... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.vectara.VectaraTranslator.html |
09d416081f5d-0 | langchain.retrievers.kendra.combined_text¶
langchain.retrievers.kendra.combined_text(item: ResultItem) → str[source]¶
Combine a ResultItem title and excerpt into a single string.
Parameters
item – the ResultItem of a Kendra search.
Returns
A combined text of the title and excerpt of the given item. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.combined_text.html |
b15c1399d274-0 | langchain.retrievers.vespa_retriever.VespaRetriever¶
class langchain.retrievers.vespa_retriever.VespaRetriever[source]¶
Bases: BaseRetriever
Vespa 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.
p... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-1 | Subclasses should override this method if they can batch more efficiently.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-4 | classmethod from_orm(obj: Any) → Model¶
classmethod from_params(url: str, content_field: str, *, k: Optional[int] = None, metadata_fields: Union[Sequence[str], Literal['*']] = (), sources: Optional[Union[Sequence[str], Literal['*']]] = None, _filter: Optional[str] = None, yql: Optional[str] = None, **kwargs: Any) → Ves... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-5 | namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-6 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
b15c1399d274-7 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html |
81ddae3d6ce9-0 | langchain.retrievers.bm25.default_preprocessing_func¶
langchain.retrievers.bm25.default_preprocessing_func(text: str) → List[str][source]¶ | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.bm25.default_preprocessing_func.html |
5e2b8d8b2ce7-0 | langchain.retrievers.databerry.DataberryRetriever¶
class langchain.retrievers.databerry.DataberryRetriever[source]¶
Bases: BaseRetriever
Databerry API 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 mode... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
5e2b8d8b2ce7-1 | Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
:param tags: 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 a... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
5e2b8d8b2ce7-2 | jsonpatch ops that describe how the state of the run has changed in each
step, and the final state of the run.
The jsonpatch ops can be applied in order to construct state.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default im... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
5e2b8d8b2ce7-3 | exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating
the new model: you should trust this data
deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, i... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
5e2b8d8b2ce7-4 | This metadata will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
Returns
List of relevant documents
invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶
classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, i... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
5e2b8d8b2ce7-5 | classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
stream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
5e2b8d8b2ce7-6 | with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶
property InputType: Type[langchain.schema.runnable.utils.Input]¶
property OutputType: Type[langchain.schema.runna... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
1c59f16424e0-0 | langchain.retrievers.self_query.deeplake.DeepLakeTranslator¶
class langchain.retrievers.self_query.deeplake.DeepLakeTranslator[source]¶
Translate DeepLake internal query language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.deeplake.DeepLakeTranslator.html |
a14165178097-0 | langchain.retrievers.merger_retriever.MergerRetriever¶
class langchain.retrievers.merger_retriever.MergerRetriever[source]¶
Bases: BaseRetriever
Retriever that merges the results of multiple retrievers.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input d... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-1 | Subclasses should override this method if they can batch more efficiently.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-4 | namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-5 | classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a list of strings that describes the path
to the object.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a list of inputs to a list of outputs,
by calling invoke() with e... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-6 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
a14165178097-7 | Examples using MergerRetriever¶
LOTR (Merger Retriever) | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.merger_retriever.MergerRetriever.html |
e46363bff785-0 | langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever¶
class langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever[source]¶
Bases: BaseRetriever
Weaviate hybrid search retriever.
See the documentation:https://weaviate.io/blog/hybrid-search-explained
Create a new model by parsing ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
e46363bff785-1 | param text_key: str [Required]¶
The name of the text key to use.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation of abatch, which calls ainvoke N times.
Subclasses ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
e46363bff785-2 | Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
e46363bff785-3 | Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
e46363bff785-4 | Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[s... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
e46363bff785-5 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
e46363bff785-6 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.