https://github.com/jesuscopado/samantha-os1
Samantha OS1 is a conversational AI assistant powered by the Realtime API from OpenAI
https://github.com/jesuscopado/samantha-os1
agent ai-agent openai realtime-api speech-to-speech
Last synced: about 2 months ago
JSON representation
Samantha OS1 is a conversational AI assistant powered by the Realtime API from OpenAI
- Host: GitHub
- URL: https://github.com/jesuscopado/samantha-os1
- Owner: jesuscopado
- License: mit
- Created: 2024-10-17T23:39:55.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-27T18:44:04.000Z (5 months ago)
- Last Synced: 2025-03-28T19:07:42.799Z (about 2 months ago)
- Topics: agent, ai-agent, openai, realtime-api, speech-to-speech
- Language: Python
- Homepage: https://www.youtube.com/watch?v=qVstKgrwX_o
- Size: 1.03 MB
- Stars: 135
- Watchers: 8
- Forks: 77
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Samantha OSยน (Her)
![]()
Samantha OSยน loading animationSamantha is an AI assistant inspired by the movie *Her*. This project is built to provide real-time voice interactions using the Realtime API and Chainlit. Samantha acts as an agent that calls various tools to handle user requests, such as querying stock prices, executing SQL commands, generating images, and creating Python scripts.
## YouTube Demo
Watch a 2-minute demonstration of Samantha in action, where I showcase real-time voice interactions and various capabilities of the AI assistant.
![]()
๐ Click the image to watch the demo on YouTube## Setup and Running
You can run Samantha either by setting up a virtual environment using `uv` or using Docker Compose. Note that setting up the environment variables is required in all cases.
### Option 1: Using Virtual Environment
1. **Clone the Repository**
```sh
git clone https://github.com/jesuscopado/samantha-os1.git
cd samantha-os1
```2. **Set Up Virtual Environment**
- Install `uv` package manager: [Installation Instructions](https://docs.astral.sh/uv/getting-started/installation/)
- Create the virtual environment:
```sh
uv sync
```
- Activate the virtual environment:
```sh
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
```3. **Environment Variables**
- Create a `.env` file in the root directory by copying `.env.example` and updating it with your own keys.4. **Run the Application**
```sh
cd app
chainlit run samantha.py
```### Option 2: Using Docker Compose
1. **Environment Variables**
- Create a `.env` file in the root directory by copying `.env.example` and updating it with your own keys.2. **Build and Run with Docker Compose**
- Make sure Docker and Docker Compose are installed.
- Run the following command:
```sh
docker-compose up --d
```## Tools and Features
This project includes several powerful tools:
- **Stock Price Queries**: Using the `yfinance` package, Samantha can query the latest stock price information.
- **Plotly Charts**: Visualizations are created using Plotly to provide insights.
- **Image Generation**: Samantha can generate images using AI models through the Together API.
- **Browser Interaction**: Open web pages based on prompts.
- **Internet Search**: Samantha can perform internet searches via the Tavily API.
- **LinkedIn Post Drafting**: Create LinkedIn posts based on given topics using an AI model.
- **Python Script Generation**: Generate Python scripts on-demand based on user-provided topics.
- **Python File Execution**: Create and execute Python scripts directly from the assistant.
- **๐ Database Interaction**: Convert natural language to SQL and execute db commands with formatted results.
- **๐ Email Drafting**: Compose professional, personalized emails with appropriate subject lines and content.