Build AI Apps Fast
Project description
CyberChipped
Introduction
CyberChipped enables building powerful AI apps fast by providing three core abstractions.
These abstractions are the OpenAI Assistant, AI Function, and AI Model.
The key selling point of this library is to handle the OpenAI Assistant thread run system automatically.
Build a Hello World AI app in two lines of code!
CyberChipped powers the most feature-rich AI Companion - CometHeart!
Install
pip install cyberchipped
Setup
import cyberchipped
cyberchipped.settings.openai.api_key = "YOUR_OPENAI_API_KEY"
Abstractions
OpenAI Assistant
from cyberchipped.assistants import Assistant
with Assistant() as ai:
print(ai.say("Hello World!"))
# prints: Hello there! How can I assist you today?
AI Function
from cyberchipped import ai_fn
@ai_fn
def echo(text: str) -> str:
"""You return `text`."""
print(echo("Hello World!"))
# prints: "Hello World!"
AI Model
from cyberchipped import ai_model
from pydantic import BaseModel, Field
@ai_model
class Planet(BaseModel):
"""Planet Attributes"""
name: str = Field(..., description="The name of the planet.")
planet = Planet("Mars is a great place to visit!")
print(planet.name)
# prints: "Mars"
Source
This is a hard fork of Marvin pre-release
Platform Support
Mac and Linux
Requirements
Python 3.11
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-0.1.11.tar.gz
(26.1 kB
view hashes)
Built Distribution
Close
Hashes for cyberchipped-0.1.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b0cc793703ae9d97d7ae5fd5d6f4b78f0dfde9397d83d594c7f279189bad8a3 |
|
MD5 | 552635b4b384e8502d405a36260a08f0 |
|
BLAKE2b-256 | 52b41b68cbcdb20c2cbd3e3bfb35b77d5f5747a405cc51118aef7f0b5eedc245 |