Skip to content

Commit

Permalink
Add Readme + requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor11l committed Dec 11, 2024
1 parent 636401e commit 79a6890
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
61 changes: 61 additions & 0 deletions examples/conversational-ai/twilio/python-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Conversational AI Twilio Python SDK

## Getting Started

### Setting Up the Environment

1. **Create a Virtual Environment**
Navigate to your project directory and create a virtual environment:

```bash
python -m venv venv
```

2. **Activate the Virtual Environment**
- On Windows:
```bash
venv\Scripts\activate
```
- On macOS/Linux:
```bash
source venv/bin/activate
```

3. **Install Requirements**
Install the necessary packages using pip:

```bash
pip install -r requirements.txt
```

### Running the Application

To start the application, run the following command:

```bash
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4
```

In your code, ensure that the `requires_auth` parameter is set correctly in the `Conversation` instantiation. It should have the same value as the settings of your agent.

### Setting Environment Variables

You need to export the following environment variables:

- `ELEVENLABS_API_KEY`
- `AGENT_ID`

You can do this in your terminal:

```bash
export ELEVENLABS_API_KEY='your_api_key_here'
export AGENT_ID='your_agent_id_here'
```

Alternatively, you can use a `.env` file with the `python-dotenv` package. Create a `.env` file in your project root and add:

```
ELEVENLABS_API_KEY=your_api_key_here
AGENT_ID=your_agent_id_here
```
7 changes: 7 additions & 0 deletions examples/conversational-ai/twilio/python-sdk/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fastapi
uvicorn
twilio
python-dotenv
elevenlabs
starlette
python-multipart

0 comments on commit 79a6890

Please sign in to comment.