Build AI Assistants Fast
Project description
CyberChipped
Introduction
CyberChipped powers the best AI Companion - CometHeart!
In a few lines of code build a conversational AI Assistant!
Install
pip install cyberchipped
OpenAI Assistant
from cyberchipped.ai import SQLiteDatabase, AI
database = SQLiteDatabase("sqlite.db")
@app.post("/conversation/{user_id}")
async def conversation_endpoint(user_id: str, audio_file: UploadFile = File(...)):
async with AI(
api_key=os.getenv("OPENAI_API_KEY"),
name="CometHeart AI Simple",
instructions="You are CometHeart an AI voice assistant - you answer questions and help with tasks. You keep your responses brief and tailor them for speech.",
database=database
) as ai:
audio_generator = await ai.conversation(user_id, audio_file)
return StreamingResponse(
content=audio_generator,
media_type="audio/x-aac",
)
Database
CyberChipped requires a database to track and manage OpenAI Assistant threads across runs.
You can use MongoDB or SQLite.
Platform Support
Mac and Linux
Run tests
poetry run pytest
Requirements
Python >= 3.12
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
cyberchipped-1.0.1.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for cyberchipped-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5c0771322472375bdf1cb6d2fc4d6455da6aefa093c9053c7531e15f72ca38b |
|
MD5 | 1b205b2bd0cc276cab3fc8000dee32c7 |
|
BLAKE2b-256 | c68d963a2dcfc8de7411fb0fd2c553a7e0fe144db02fe4b1ce86609dbafde45b |