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.3.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.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: demystify_rag-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 4358a5b98984d24a6789fa96026d2c28ffbe5cd0ac570f176a6818308b111319
MD5 6b5258f0fb69b750d4983f8845d1055d
BLAKE2b-256 7acc61c79f868f6cab5118ceb0e7a6edf273e56a24a6b25a5ce166c322d41e73

See more details on using hashes here.

Provenance

The following attestation bundles were made for demystify_rag-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: demystify_rag-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f27066783bbac5c70803cf8b6661eba2d7640463ffa5d9297d550c6b154adf2d
MD5 8deec8e35a0abe509f8cd2bc2e8d6b53
BLAKE2b-256 69fd9847826f569bb47781659c6fc3860f3c23401b21182b258ce19a21c940be

See more details on using hashes here.

Provenance

The following attestation bundles were made for demystify_rag-0.3.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