Skip to main content

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 errors
  • AISupportRateLimitError: Rate limit exceeded
  • AISupportAPIError: 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)

Source distribution for ai-support-client 0.1.0
File Size Uploaded
ai_support_client-0.1.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-support-client 0.1.0
File Interpreter ABI Platform
ai_support_client-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page