Official Python SDK for building integrations with Krira Augment RAG pipelines
Project description
Krira Augment SDK
Official Python SDK for building integrations with Krira Augment RAG pipelines.
Installation
pip install krira-augment-sdk
Quick Start
from krira_augment import KriraAugment
# Initialize the client with your API key and pipeline name
client = KriraAugment(api_key="sk-live-your-key", pipeline_name="employees")
# Ask a question to your RAG pipeline
response = client.ask("What can you help me with?")
print(response.answer)
# With conversation context
response = client.ask(
"Tell me more about that",
conversation_id="my-session-123"
)
print(response.answer)
API Reference
KriraAugment
The main client class for interacting with Krira Augment pipelines.
Constructor
KriraAugment(
*,
api_key: str, # Your Krira Augment API key
pipeline_name: str, # Name or ID of your RAG pipeline
base_url: str = None, # Optional custom API base URL
timeout: float = 15.0, # Request timeout in seconds
)
Methods
ask(question, *, conversation_id=None, metadata=None, timeout=None)
Send a question to your RAG pipeline and receive an answer.
Parameters:
question(str): The question to askconversation_id(str, optional): Session ID for conversation contextmetadata(dict, optional): Additional metadata to passtimeout(float, optional): Override the default timeout
Returns: ChatResponse object with:
answer(str): The model's responsepipeline_name(str): The pipeline usedconversation_id(str, optional): The conversation IDraw(dict): Raw API response
close()
Close the underlying HTTP session.
Error Handling
from krira_augment import KriraAugment
from krira_augment.exceptions import (
AuthenticationError,
PermissionDeniedError,
RateLimitError,
ServerError,
)
client = KriraAugment(api_key="sk-live-your-key", pipeline_name="employees")
try:
response = client.ask("What is the status of my order?")
print(response.answer)
except AuthenticationError:
print("Invalid API key")
except PermissionDeniedError:
print("API key doesn't have access to this pipeline")
except RateLimitError:
print("Too many requests, slow down")
except ServerError:
print("Krira Augment service is temporarily unavailable")
Aliases
For convenience, additional class aliases are available:
from krira_augment import KriraPipeline, KriraAugmentClient
# These are equivalent to KriraAugment
client = KriraPipeline(api_key="...", pipeline_name="...")
client = KriraAugmentClient(api_key="...", pipeline_name="...")
Requirements
- Python 3.9+
- requests >= 2.31.0
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file krira_augment_sdk-1.0.0.tar.gz.
File metadata
- Download URL: krira_augment_sdk-1.0.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0090a8a71e3319207e723a3cad761914c9f41831fe59092b030cda8232e62e19
|
|
| MD5 |
86cacb989d006d5b2737f9dfaa3718e2
|
|
| BLAKE2b-256 |
4312a46d94c52faab603bd55113ff951a11710f0d20920ceaf6971afce6e6ed2
|
File details
Details for the file krira_augment_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: krira_augment_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1466ca922aa8f1bb316fb78383a27ff46e26313ed2685ce8a44fb3ea2a39eac
|
|
| MD5 |
5e3d3daf44400a7af49dfa69dd90b452
|
|
| BLAKE2b-256 |
5f3cf2082da14b1d2949b56b729d672fca31cb32366efd592337a0fdd59190fa
|