Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a quickstart to voice-chat #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/app/docs/guides/voice-chat/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,42 @@ A detailed video and step by step instructions are coming soon, in the meantime,
we've called out the important parts of the repo above to help you get started
with it.

## Quickstart to Running the Sample App

```shell
git clone https://github.com/sublayerapp/rails_llm_voice_chat_example.git
```

```shell
bundle install
```

```shell
rails db:migrate
```

```shell
export OPENAI_API_KEY=your_openai_api_key`
```

<!-- should we use something like `.env` instead? -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a great point. I've mostly been doing this stuff locally but now that we're building out project templates/project generators with a CLI, should probably bake in dotenv from the start. Added sublayerapp/sublayer#73 to track this


```shell
rails s
```

[http://127.0.0.1:3000/](http://127.0.0.1:3000/)
Now hold the button and talk to the chat bot 😄

```shell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's your thinking here? Just a way to browse your conversation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was the answer to the immediate next question I had, "where does this app keep transcripts?"

rails c
```

```ruby
c = Conversation.last
puts c.messages.map { |m| "#{m.role}: #{m.content}" }
```

## Code Walkthrough

### Sublayer Generators
Expand Down