Skip to main content

Python client for the ACRA API — Adaptive Contextual Retrieval Architecture

Project description

nurricai

Python client for the ACRA API — Adaptive Contextual Retrieval Architecture by NurricAI.

ACRA is intelligent RAG-as-a-service. It automatically classifies your query complexity and adapts retrieval depth — simple questions get fast single-hop retrieval, complex multi-hop questions get deeper iterative retrieval with Gemma 27B generation.

Install

pip install nurricai

Quickstart

from nurricai import ACRA

acra = ACRA(api_key="nacra-your-key-here")

# Index your documents
acra.ingest(["ACRA stands for Adaptive Contextual Retrieval Architecture..."])

# Query
response = acra.query("What does ACRA stand for?")
print(response.answer)
print(f"Credits used: {response.credits_used}")
print(f"Credits left: {response.credits_remaining}")

With metadata and namespaces

acra.ingest(
    texts=["Page 1 content...", "Page 2 content..."],
    metadata=[{"source": "manual.pdf", "page": 1},
              {"source": "manual.pdf", "page": 2}],
    namespace="my-project"
)

response = acra.query("What is on page 2?", namespace="my-project")
for source in response.sources:
    print(source.metadata, source.score)

Error handling

from nurricai import ACRA, OutOfCreditsError, AuthError, ACRAError

try:
    response = acra.query("What is X?")
except OutOfCreditsError as e:
    print(f"Out of credits. Upgrade at {e.upgrade_url}")
except AuthError:
    print("Invalid API key")
except ACRAError as e:
    print(f"Error: {e}")

Plans

Plan Credits Price
Free 100 / day $0
Hobby 5,000 / month $10
Team 25,000 / month $50
Business 100,000 / month $100
Enterprise Unlimited $499

Get your API key at nurricai.com

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

nurricai-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

nurricai-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file nurricai-0.1.0.tar.gz.

File metadata

  • Download URL: nurricai-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nurricai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77bc66c35bac681bbb62bc3d22f807e207933b518f28a2598161906b955c1b66
MD5 fe394fd616c462a3e2b11ed13871928a
BLAKE2b-256 bf64674c830de94255abb8b20f92d790c7c23e63a44ef768b2b2a5bfee8aee9e

See more details on using hashes here.

File details

Details for the file nurricai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nurricai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nurricai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 838c66cb60645b463f6973c36049353a948102e6dae99f75fad58b8c520669e2
MD5 8a76bcdc976029754ca2ebeb2ae8197c
BLAKE2b-256 91c1f4f8d54a6f0d040877c09908290d65d8d1b2a6a098c40f03ebb0873ecece

See more details on using hashes here.

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