-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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? --> | ||
|
||
```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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's your thinking here? Just a way to browse your conversation? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
There was a problem hiding this comment.
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