A flexible chatbot framework supporting multiple AI providers
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ariai-0.1.0.tar.gz.
File metadata
- Download URL: ariai-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b07cad6242d428a0cf0550dc5db07b8527760433867d010014c58744149e582
|
|
| MD5 |
c51a635ea78f170eec2d40181979bc29
|
|
| BLAKE2b-256 |
ede309001b037afa83bf7983810c6eff9407275bb0f896f991b87a0df5fabba3
|
File details
Details for the file ariai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ariai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
049c1c05cb941db50e618b3d86ebf7b9792769802011714a911c0b5c15be9d76
|
|
| MD5 |
340f86189a4c51f316468556d39d7dd8
|
|
| BLAKE2b-256 |
db80e6791c0b7874c83f34e0e0e3632ffa034d5757cdced737a8c435e66492aa
|