demo: Restructure storytelling-chatbot directory, update README steps, link to vercel demo
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[](https://storytelling-chatbot.fly.dev)
|
||||
[](https://gemini-storybot.vercel.app/)
|
||||
|
||||
# Storytelling Chatbot
|
||||
|
||||
@@ -9,7 +9,6 @@ It periodically prompts the user for input for a 'choose your own adventure' sty
|
||||
|
||||
We use Gemini 2.0 for creating the story and image prompts, and we add visual elements to the story by generating images using Google's Imagen.
|
||||
|
||||
|
||||
---
|
||||
|
||||
### It uses the following AI services:
|
||||
@@ -20,7 +19,7 @@ Transcribes inbound participant voice media to text.
|
||||
|
||||
**Google Gemini 2.0 - LLM**
|
||||
|
||||
Our creative writer LLM. You can see the context used to prompt it [here](src/prompts.py)
|
||||
Our creative writer LLM. You can see the context used to prompt it [here](server/prompts.py)
|
||||
|
||||
**ElevenLabs - Text-to-Speech**
|
||||
|
||||
@@ -34,47 +33,76 @@ Adds pictures to our story. Prompting is quite key for style consistency, so we
|
||||
|
||||
## Setup
|
||||
|
||||
**Install requirements**
|
||||
### Client
|
||||
|
||||
```shell
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
1. Navigate to the client directory:
|
||||
|
||||
**Create environment file and set variables:**
|
||||
```shell
|
||||
cd client
|
||||
```
|
||||
|
||||
```shell
|
||||
mv env.example .env
|
||||
```
|
||||
2. Install dependencies:
|
||||
|
||||
When deploying to production, to ensure only this app can spawn a new bot, set your `ENV` to `production`
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
**Build the frontend:**
|
||||
3. Build the client:
|
||||
|
||||
This project uses a custom frontend, which needs to built. Note: this is done automatically as part of the Docker deployment.
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
```shell
|
||||
cd frontend/
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
### Server
|
||||
|
||||
The build UI files can be found in `frontend/out`
|
||||
1. Navigate to the server directory
|
||||
|
||||
## Running it locally
|
||||
```shell
|
||||
cd ../server
|
||||
```
|
||||
|
||||
Start the API / bot manager:
|
||||
2. Set up your virtual environment and install requirements
|
||||
|
||||
`python src/bot_runner.py --host localhost`
|
||||
```shell
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
If you'd like to run a custom domain or port:
|
||||
3. Create environment file and set variables
|
||||
|
||||
`python src/bot_runner.py --host somehost --p someport`
|
||||
```shell
|
||||
mv env.example .env
|
||||
```
|
||||
|
||||
➡️ Open the host URL in your browser `http://localhost:7860`
|
||||
You'll need API keys for:
|
||||
|
||||
If you've run previous versions of the demo, make sure to set `ENV=dev`, and remove the `RUN_AS_VM` line from the .env file.
|
||||
- DAILY_API_KEY
|
||||
- ELEVENLABS_API_KEY
|
||||
- ELEVENLABS_VOICE_ID
|
||||
- GOOGLE_API_KEY
|
||||
|
||||
4. (Optional) Deployment:
|
||||
|
||||
When deploying to production, to ensure only this app can spawn new bot processes, set your `ENV` to `production`
|
||||
|
||||
## Run it locally
|
||||
|
||||
1. Navigate back to the demo's root directory:
|
||||
|
||||
```shell
|
||||
cd ..
|
||||
```
|
||||
|
||||
2. Run the application:
|
||||
|
||||
```shell
|
||||
python server/bot_runner.py --host localhost
|
||||
```
|
||||
|
||||
You can run with a custom domain or port using: `python server/bot_runner.py --host somehost --p someport`
|
||||
|
||||
3. ➡️ Open the host URL in your browser: http://localhost:7860
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user