Metadata-Version: 2.2
Name: ai-support-client
Version: 0.1.0
Summary: Python client for AI Support API integration
Home-page: https://github.com/yourusername/ai-support-client
Author: Your Name
Author-email: your.email@example.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: pydantic>=2.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# AI Support Client

A Python client library for integrating AI-powered customer support into your applications.

## Installation

```bash
pip install ai-support-client
```

## Quick Start

```python
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

```python
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.

```python
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.

```python
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:

```python
from ai_support_client.exceptions import AISupportAuthError

try:
    response = client.handle_inquiry(message="Hello")
except AISupportAuthError:
    print("Invalid API key")
```

## License

MIT License
