An integration package connecting Dappier and LangChain
Project description
langchain-dappier
This package contains the LangChain integration with Dappier
Installation
pip install -U langchain-dappier
And you should configure credentials by setting the following environment variables:
export DAPPIER_API_KEY="your-api-key-here"
Retrievers
DappierRetriever
class exposes chat models from Dappier.
Parameters:
data_model_id
(str): Data model ID, starting withdm_
. You can find the available data model IDs at Dappier marketplace.k
(int): Number of documents to return.ref
(Optional[str]): Site domain where AI recommendations are displayed.num_articles_ref
(int): Minimum number of articles from the specifiedref
domain. The rest will come from other sites within the RAG model.search_algorithm
(Literal["most_recent", "most_recent_semantic", "semantic", "trending"]): Search algorithm for retrieving articles.api_key
(Optional[str]): The API key used to interact with the Dappier APIs.
from langchain_dappier import DappierRetriever
retriever = DappierRetriever(
data_model_id="dm_01jagy9nqaeer9hxx8z1sk1jx6"
)
query = "latest tech news"
retriever.invoke(query)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file langchain_dappier-0.2.4.tar.gz
.
File metadata
- Download URL: langchain_dappier-0.2.4.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.1 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c3013a2309b285242f4b23e838f736df5fc65c5f25c05a76ad68d2b072da8a41
|
|
MD5 |
7c4bff8ada59e9e64bd700cd1ba2f44c
|
|
BLAKE2b-256 |
628289384c6a2220a56df8afb0b7f1a97219933909e2ecf3c074fd2128c8fc28
|
File details
Details for the file langchain_dappier-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: langchain_dappier-0.2.4-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.1 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ab6aa8f92d1c619572baf241791005e839fd63764de9b0280a70752e74781fae
|
|
MD5 |
5b9ff12536382e2fbcb29910f10159b7
|
|
BLAKE2b-256 |
2221157d8b0c5715bd1c2c3a0022569ccbcf0bb76e738ea3ce5d38b41979259e
|