SHADAI Client
Project description
SHADAI Intelligence Client
A Python client for interacting with the SHADAI Intelligence API. This client provides a simple interface for document processing, querying, and session management.
Installation
pip install shadai
Requirements
- Python >= 3.12
- Environment Variables:
INTELLIGENCE_API_KEY: Your SHADAI Intelligence API key
Quick Start
import asyncio
from shadai.intelligence.core.session import Session
async def main():
async with Session(type="standard", delete_session=True) as session:
await session.ingest(input_dir=input_dir)
await session.query(
query="¿De qué habla la quinta enmienda?", display_in_console=True
)
await session.get_summary(
display_in_console=True
)
await session.create_article(
topic="Enmiendas de los estados unidos y su impacto en la sociedad",
display_in_console=True,
)
if __name__ == "__main__":
asyncio.run(main())
Features
- Asynchronous API interactions
- Automatic session management
- File ingestion with progress tracking
- Interactive query interface
- Robust error handling and retries
- Rich console output
Session Configuration
| Parameter | Type | Description | Default |
|---|---|---|---|
| type | str | Processing type ("light", "standard", "deep") | "standard" |
| llm_model | str | Language model to use | None |
| llm_temperature | float | Model temperature | None |
| llm_max_tokens | int | Maximum tokens for response | None |
| query_mode | str | Query processing mode | None |
| language | str | Response language | None |
| delete_session | bool | Auto-delete session on exit | True |
Error Handling
The client includes comprehensive error handling for:
- Configuration errors
- API communication issues
- File processing problems
- Session management failures
Author
SHADAI GROUP jaisir@shadai.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shadai-0.1.8.tar.gz
(26.9 kB
view details)
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
shadai-0.1.8-py3-none-any.whl
(12.6 kB
view details)
File details
Details for the file shadai-0.1.8.tar.gz.
File metadata
- Download URL: shadai-0.1.8.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e12be741d961caff3d5d1bb03ecdefdc0ea57894152c52b04d46b43dea5ecace
|
|
| MD5 |
682c198d8f211d1baea65f8a9083aed3
|
|
| BLAKE2b-256 |
5e3fe92719090c773b9a0209300d5ec82bb84d9705318e0b24348cfa38e71216
|
File details
Details for the file shadai-0.1.8-py3-none-any.whl.
File metadata
- Download URL: shadai-0.1.8-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43a77401dfc620088a052e08ec2812d0d608a08ff0e84f873d2da7b434b9db80
|
|
| MD5 |
8da787429653dfd2c39e287b4772edfc
|
|
| BLAKE2b-256 |
ea6d2347eb793e2a8992a8b5a9ed115294caa17d0a1f70a76f28b3c5833b7f68
|