-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
7
examples/conversational-ai/twilio/python-sdk/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fastapi | ||
uvicorn | ||
twilio | ||
python-dotenv | ||
elevenlabs | ||
starlette | ||
python-multipart |