AI Support Client
A Python client library for integrating AI-powered customer support into your applications.
Installation
pip install ai-support-client
Quick Start
from ai_support_client import AISupport
# Initialize the client
client = AISupport(
api_key="your_api_key",
project_id="your_project_id"
)
# Handle a customer inquiry
response = client.handle_inquiry(
message="How do I reset my password?",
inquiry_type="chat",
context={
"customer_id": "12345",
"previous_interactions": []
}
)
print(response.message)
Features
- Easy integration with AI Support API
- Support for chat, voice, and email inquiries
- Customizable context for better AI responses
- Rate limiting and error handling
- Type hints for better IDE support
Documentation
Initialization
client = AISupport(
api_key="your_api_key",
project_id="your_project_id",
base_url="https://api.aisupport.com/v1" # Optional
)
Methods
handle_inquiry
Handle a customer inquiry and get an AI-generated response.
response = client.handle_inquiry(
message="How do I reset my password?",
inquiry_type="chat", # "chat", "voice", or "email"
context={
"customer_id": "12345",
"previous_interactions": []
}
)
get_usage
Get current API usage statistics.
usage = client.get_usage()
print(f"API calls this month: {usage.total_calls}")
Error Handling
The library raises specific exceptions for different error cases:
AISupportAuthError: Authentication errorsAISupportRateLimitError: Rate limit exceededAISupportAPIError: General API errors
Example:
from ai_support_client.exceptions import AISupportAuthError
try:
response = client.handle_inquiry(message="Hello")
except AISupportAuthError:
print("Invalid API key")
License
MIT License
Metadata
Release files for ai-support-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_support_client-0.1.0.tar.gz | 4.3 kB | Without provenance | Details for ai_support_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_support_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ai_support_client-0.1.0-py3-none-any.whl |
Total release size: 9.5 kB
Release files / ai_support_client-0.1.0.tar.gz
| Download URL | ai_support_client-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1be87c6a55d4d7b9e360ae3d0e2eca1777b0577e6093851e9d6c1643df39af03
|
|
BLAKE2b-256 checksum How to use checksums |
753809d56f90349ad7209be5548639eae40f8b92bb2f38924e53378acf700203
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / ai_support_client-0.1.0-py3-none-any.whl
| Download URL | ai_support_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d7ec68747def1c9babe5093279f036f0cadf1e2e187a6fa80d4794c45316532
|
|
BLAKE2b-256 checksum How to use checksums |
460aefca444223d2c99578b7ba74247bdb99d44582ff2c79995f83ee9f44fb25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for ai-support-client 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.