haive.core.engine.retriever.providers.RemoteLangChainRetrieverConfig¶
Remote LangChain Retriever implementation for the Haive framework.
This module provides a configuration class for the Remote LangChain retriever, which enables retrieval from remote LangChain services and endpoints, allowing distributed and federated retrieval architectures.
The RemoteLangChainRetriever works by: 1. Connecting to remote LangChain retrieval endpoints 2. Sending queries to distributed retrieval services 3. Receiving and processing results from remote systems 4. Providing unified access to distributed retrieval infrastructure
This retriever is particularly useful when: - Building distributed retrieval architectures - Need to access remote LangChain services - Implementing federated search across multiple systems - Building microservice-based retrieval infrastructures
The implementation integrates with LangChain Community’s RemoteLangChainRetriever while providing a consistent Haive configuration interface with secure endpoint management.
Classes¶
Configuration for Remote LangChain retriever in the Haive framework. |
Module Contents¶
- class haive.core.engine.retriever.providers.RemoteLangChainRetrieverConfig.RemoteLangChainRetrieverConfig[source]¶
Bases:
haive.core.common.mixins.secure_config.SecureConfigMixin
,haive.core.engine.retriever.retriever.BaseRetrieverConfig
Configuration for Remote LangChain retriever in the Haive framework.
This retriever enables retrieval from remote LangChain services and endpoints, allowing distributed and federated retrieval architectures.
- retriever_type¶
The type of retriever (always REMOTE_LANGCHAIN).
- Type:
- api_key¶
API key for authentication (auto-resolved).
- Type:
Optional[SecretStr]
Examples
>>> from haive.core.engine.retriever import RemoteLangChainRetrieverConfig >>> >>> # Create remote LangChain retriever >>> config = RemoteLangChainRetrieverConfig( ... name="remote_retriever", ... endpoint_url="https://api.example.com/retrieve", ... k=5, ... timeout=30 ... ) >>> >>> # Instantiate and use the retriever >>> retriever = config.instantiate() >>> docs = retriever.get_relevant_documents("distributed systems architecture")
- instantiate()[source]¶
Create a Remote LangChain retriever from this configuration.
- Returns:
Instantiated retriever ready for remote retrieval.
- Return type:
RemoteLangChainRetriever
- Raises:
ImportError – If required packages are not available.
ValueError – If configuration is invalid.