A Python client for interacting with the SHADAI API. This client provides a simple interface for document processing, querying, and session management.Generate an API KEY#
Sign in using gmail account
Set SHADAI_API_KEY as an environment variable in your python project
Setup#
Install our python client package using pip
Requirements#
SHADAI_API_KEY
: Your SHADAI API key
Features#
Asynchronous API interactions
Automatic session management
File ingestion with progress tracking
Interactive query interface
Robust error handling and retries
Getting Started with SHADAI#
SHADAI Intelligence Client is a powerful tool for document processing, querying, and AI-assisted analysis. This guide will walk you through various use cases and show you how to leverage the full capabilities of the platform.Session Configuration#
When working with SHADAI, you'll always start by creating a Session. Here are the configuration options available:Parameter | Type | Description | Default |
---|
type | str | Processing type ("light", "standard", "deep") | "standard" |
llm_model | str | Language model to use | AIModels.CLAUDE_3_5_HAIKU |
llm_temperature | float | Model temperature | 0.7 |
llm_max_tokens | int | Maximum tokens for response | 4096 |
query_mode | str | Query processing mode | hybrid |
language | str | Response language | es |
delete | bool | Auto-delete session on exit | True |
In ShadAI framework agents can be called in a specific Session.
Sessions will contain data in their context and agents can interact with it.
You can create unlimited Sessions with different context of data.
TYPES OF SESSION
In ShadAI we define 3 different kind of sessions and you need to understand their use details:LIGHT | STANDARD | DEEP |
---|
Fastest Response | Quick Response | Slow Response |
Text Processing | Support Images, Audio | Complex files and Reasonning |
Working with Documents#
Ingesting Documents#
The first step in most SHADAI workflows is ingesting documents. SHADAI can process various document formats and extract relevant information.Managing Sessions#
SHADAI provides tools for managing your sessions, including creating, listing, retrieving, and deleting them.Querying and Analysis#
Making a Single Query#
The most basic way to interact with your documents is through a single query:Making Multiple Queries#
For more complex analysis, you might want to ask multiple related questions:Getting a Session Summary#
SHADAI can generate concise summaries of the documents in your session:Creating an Article#
SHADAI can generate comprehensive articles on topics related to the documents in your session:Advanced Interactions#
Simple LLM Completion#
Sometimes you just need a direct answer from the language model:Chat with Data and History#
For interactive conversations that maintain context:For more complex AI-powered workflows, you can create a Tool Agent that combines document knowledge with custom functions:Error Handling#
The SHADAI client includes comprehensive error handling for:Session management failures
Explore Use Cases:#
We have a public repository of some use cases in different industries such as Education, Financial, Logistics, Retail, Healhtech. Modified at 2025-05-08 07:45:50