Metadata-Version: 2.4
Name: rawa_bots
Version: 0.1.1
Summary: A Python library to easily build Gemini-powered chatbots.
Author: Your Name or Organization
Author-email: Your Name or Organization <your@email.com>
License: MIT License
        
        Copyright (c) 2024 Your Name or Organization
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE. 
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: google-genai>=0.1.0
Dynamic: author
Dynamic: license-file
Dynamic: requires-python

# rawa_bots

A Python library to easily build Gemini-powered chatbots with minimal code.

## Features
- Easy Gemini API integration
- Conversational and single-turn modes
- Automatic conversation history
- Custom generation parameters (temperature, top_p, etc.)
- Graceful error handling with custom exceptions
- Ready for PyPI packaging

## Installation

```bash
pip install rawa_bots
```

> **Note:** Requires Python 3.8+ and a valid Gemini API key. The `google-genai` package will be installed automatically.

## Usage Example

```python
from rawa_bots import GeminiBot

bot = GeminiBot(
    api_key="YOUR_API_KEY",
    model_name="gemini-2.0-flash-001",  # or any valid Gemini model
    system_prompt="You are helpful.",
    conversational=True,
    temperature=0.7,  # Optional advanced config
)

response = bot.ask("Hello!")
print(response)

# Reset conversation (for conversational mode)
bot.reset()
```

## Listing Available Models

You can list all available Gemini models with:

```python
from google import genai
client = genai.Client(api_key="YOUR_API_KEY")
print([m.name for m in client.models.list()])
```

## Error Handling

- `GeminiError`: Base exception for all GeminiBot errors
- `AuthenticationError`: Raised for authentication issues
- `InvalidModelError`: Raised if the model name is invalid

## Testing

Run tests with:
```bash
python -m unittest discover tests
```

## License
MIT License 
