Skip to content
/ celai Public
forked from cel-ai/celai

Framework designed to accelerate the development of omnichannel AI virtual assistants.

Notifications You must be signed in to change notification settings

amperi0/celai

 
 

Repository files navigation

Introduction

Cel.ai is a powerful Python framework designed to accelerate the development of omnichannel virtual assistants. Whether you need to integrate with platforms like WhatsApp, Telegram, or VoIP services such as VAPI.com, Cel.ai provides the tools and flexibility to get your assistant up and running quickly.

Install

pip install from github:

pip install git+https://github.com/cel-ai/celai

Getting Started

Create a new Python file, assistant.py, and open it in your favorite text editor. Add the following code to set up a basic assistant:

# Import Cel.ai modules
from cel.connectors.cli.cli_connector import CliConnector
from cel.gateway.message_gateway import MessageGateway, StreamMode
from cel.message_enhancers.smart_message_enhancer_openai import SmartMessageEnhancerOpenAI
from cel.assistants.macaw.macaw_assistant import MacawAssistant
from cel.prompt.prompt_template import PromptTemplate

# Setup prompt
prompt = """You are an AI assistant. Called Celia. You can help a user to buy Bitcoins."""
prompt_template = PromptTemplate(prompt)

# Create the assistant based on the Macaw Assistant 
ast = MacawAssistant(
    prompt=prompt_template
)

# Create the Message Gateway - This component is the core of the assistant
# It handles the communication between the assistant and the connectors
gateway = MessageGateway(ast)

# For this example, we will use the Telegram connector
conn = CliConnector(
    stream_mode=StreamMode.FULL
)
# Register the connector with the gateway
gateway.register_connector(conn)

# Then start the gateway and begin processing messages
gateway.run()

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%