Skip to main content

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 with dm_. 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 specified ref 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

langchain_dappier-0.2.4.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

langchain_dappier-0.2.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

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

Hashes for langchain_dappier-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c3013a2309b285242f4b23e838f736df5fc65c5f25c05a76ad68d2b072da8a41
MD5 7c4bff8ada59e9e64bd700cd1ba2f44c
BLAKE2b-256 628289384c6a2220a56df8afb0b7f1a97219933909e2ecf3c074fd2128c8fc28

See more details on using hashes here.

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

Hashes for langchain_dappier-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ab6aa8f92d1c619572baf241791005e839fd63764de9b0280a70752e74781fae
MD5 5b9ff12536382e2fbcb29910f10159b7
BLAKE2b-256 2221157d8b0c5715bd1c2c3a0022569ccbcf0bb76e738ea3ce5d38b41979259e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page