Metadata-Version: 2.1
Name: cyberchipped
Version: 1.0.2
Summary: Build AI Assistants Fast
Home-page: https://cyberchipped.com
License: Apache-2.0
Keywords: ai,openai
Author: Bevan Hunt
Author-email: bevan@bevanhunt.com
Requires-Python: >=3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: aiosqlite (>=0.20.0,<0.21.0)
Requires-Dist: fastapi (>=0.111.0,<0.112.0)
Requires-Dist: motor (>=3.4.0,<4.0.0)
Requires-Dist: openai (>=1.33.0,<2.0.0)
Requires-Dist: pydantic (>=2.7.1,<3.0.0)
Project-URL: Repository, https://github.com/truemagic-coder/cyberchipped
Description-Content-Type: text/markdown

# CyberChipped

[![PyPI - Version](https://img.shields.io/pypi/v/cyberchipped)](https://pypi.org/project/cyberchipped/)
[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/bevanhunt/cyberchipped/build.yml)](https://github.com/bevanhunt/cyberchipped/actions)
[![Codecov](https://img.shields.io/codecov/c/github/bevanhunt/cyberchipped)](https://app.codecov.io/gh/bevanhunt/cyberchipped)

![CyberChipped Logo](https://cyberchipped.com/375.png)

## Introduction

CyberChipped powers the best AI Companion - [CometHeart](https://cometheart.com)!

In a few lines of code build a conversational AI Assistant!

## Install

```bash
pip install cyberchipped
```

## OpenAI Assistant
```python
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
```bash
poetry run pytest
```

## Requirements
Python >= 3.12

