AriAI
A flexible chatbot framework that supports multiple AI providers (OpenAI and Hugging Face).
Features
- Support for both OpenAI (GPT-3.5/4) and Hugging Face models
- Custom system prompts / personalities
- Conversation memory
- Rich terminal UI with colored output
- Easy to use and extend
Installation
- Clone this repository:
git clone https://github.com/username/ariai.git
cd ariai
- Build and install the package:
python setup.py sdist bdist_wheel
pip install ./dist/ariai-0.1-py3-none-any.whl
Usage
Here's a basic example:
from ariai import AriAI
# Using OpenAI
bot = AriAI(
provider="openai",
api_key="YOUR_OPENAI_API_KEY",
system_prompt="You are a helpful AI assistant."
)
# Or using Hugging Face
bot = AriAI(
provider="huggingface",
hf_model="google/flan-t5-base",
system_prompt="You are a helpful AI assistant."
)
# Start the interactive chat UI
bot.start_ui()
You can also use the chat method directly:
response = bot.chat("Hello, how are you?")
print(response)
Configuration
OpenAI
For OpenAI, you'll need to set your API key. You can either:
- Pass it directly to the constructor
- Set it as an environment variable:
OPENAI_API_KEY
Hugging Face
For Hugging Face, you can specify any model that supports text generation. The default is "google/flan-t5-base".
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for ariai 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 | |
|---|---|---|---|
| ariai-0.1.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ariai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / ariai-0.1.0.tar.gz
| Download URL | ariai-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b07cad6242d428a0cf0550dc5db07b8527760433867d010014c58744149e582
|
|
BLAKE2b-256 checksum How to use checksums |
ede309001b037afa83bf7983810c6eff9407275bb0f896f991b87a0df5fabba3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / ariai-0.1.0-py3-none-any.whl
| Download URL | ariai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
049c1c05cb941db50e618b3d86ebf7b9792769802011714a911c0b5c15be9d76
|
|
BLAKE2b-256 checksum How to use checksums |
db80e6791c0b7874c83f34e0e0e3632ffa034d5757cdced737a8c435e66492aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|