Skip to main content

Client SDK for dmstfy-rag: grounded RAG queries with citations, groundedness, abstention and SSE streaming

Project description

demystify-rag

Python client for the dmstfy-rag API — grounded RAG queries with citations, groundedness scores, honest abstention and SSE streaming. Mirrors @demystify/rag (npm).

from demystify_rag import AsyncRagClient

async with AsyncRagClient(base_url, key=key, product="jarvis") as rag:
    await rag.ingest("kb", doc_key="refund-policy", content=markdown)
    r = await rag.query("kb", "What's the refund window for annual plans?")
    if r.abstained:
        show_gap(r.clarifying_question)
    async for event in rag.query_stream("kb", "..."):
        if event["type"] == "delta":
            print(event["content"], end="")

A synchronous RagClient with the same surface is included. Errors raise RagApiError with .status, .code (branch on this), .type, .request_id.

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

demystify_rag-0.2.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

demystify_rag-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file demystify_rag-0.2.0.tar.gz.

File metadata

  • Download URL: demystify_rag-0.2.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for demystify_rag-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f8725ec7a990f31a7b8a618c9d52d4eec878d60911730abb613bdf3628e4e37a
MD5 b68c8d1a5cd92d77b9f2be8f5bfdf455
BLAKE2b-256 a8bc123714f5db71fc1d6a445d4086d36219796bacb4eb8a0c38aa443fc8fb40

See more details on using hashes here.

Provenance

The following attestation bundles were made for demystify_rag-0.2.0.tar.gz:

Publisher: publish-pypi.yml on demystify-systems/ai-services-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file demystify_rag-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: demystify_rag-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for demystify_rag-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32fa144b7effc7890eae0cac0e2e36fc8980ac1bcb99e9b2a49f7b8733dae25a
MD5 ce6e3abe8887dd227223716fd02d42d7
BLAKE2b-256 6f42bc8d819196ed69026dd07598a0074e312d7df2b03e94851a0fb5bd5b8613

See more details on using hashes here.

Provenance

The following attestation bundles were made for demystify_rag-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on demystify-systems/ai-services-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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