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

Updated OpenAi gem 7.0.1 #343

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ gem "redcarpet", "~> 3.6.0"
gem "image_processing", "~> 1.2"

gem "rails_heroicon", "~> 2.2.0"
gem "ruby-openai", "~> 6.3"
gem "ruby-openai", "~> 7.0.1"
gem "anthropic", "~> 0.1.0"
gem "tiktoken_ruby", "~> 0.0.6"
gem "solid_queue", "~> 0.2.1"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ GEM
language_server-protocol (~> 3.17.0)
prism (>= 0.19.0, < 0.20)
sorbet-runtime (>= 0.5.5685)
ruby-openai (6.3.1)
ruby-openai (7.0.1)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
faraday-multipart (>= 1)
Expand Down Expand Up @@ -379,7 +379,7 @@ DEPENDENCIES
rubocop-minitest
rubocop-rails
ruby-lsp
ruby-openai (~> 6.3)
ruby-openai (~> 7.0.1)
selenium-webdriver
solid_queue (~> 0.2.1)
sprockets-rails
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ The `render.yml` specifies details of the Render production environment. Note th
The `fly.toml` specifies details of the Fly production environment. It references the `fly-production` build target. The Fly section of the Dockerfile was generated using the dockerfile-rails generator. This is Fly's recommendation and it produces a reasonable production-ready Dockerfile. Edits to this _top section_ of the file have been kept very minimal, on purpose, because it's intended to be updated using the generator. When it was originally generated it saved all the configuration parameters into `config/dockerfile.yml`. When you run `bin/rails generate dockerfile` it will read all these configurations and attempt to re-generate the Dockerfile. You can try this, it will warn you that it's going to overwrite, and press `d` to see the diff of what changes it will make. There should be no functional changes above the line `#### END of FLY ####`. Imagine you wanted to use this generator to change the app to use MySQL ((view all generator options)[https://github.com/fly-apps/dockerfile-rails]). You could run `bin/rails generate dockerfile --mysql` and it would update your Gemfile, automatically run bundle install to install any gem changes, and then it will attempt to update Dockerfile where you can again press `d`. Inspect the diff of any changes above the line `#### END of FLY ####` and manually apply those changes. Similarly, view the diff for dockerignore and docker-entrypoint, although none of those changes should be necessary. When you get to `fly.toml` you will want to view that diff closely and manually apply those changes. At the end it will update config/dockerfile.yml to record the new configuration of the Dockerfile. In this way, you can continue to use the generator to keep the Dockerfile updated (as recommended by Fly) while not breaking the dev or Render setup.


# Instructions Running Tests locally
Step by step instructions to run tests locally

1. Create a local db by running `bin/rails db:create`
2. Then run the rails migrations by running `bin/rails db:migrate`
3. Finally run `bin/rails test` or `bin/rails test:system`
Copy link
Contributor

Choose a reason for hiding this comment

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

I had the setup instructions up on line ~115 of this file. Did you miss that or did those not work for you?

The troubleshooting is a really good thing to add. Assuming my instructions above work, then let's just move this troubleshooting section up around line 119.



** Troubleshooting **
- Error: You must have ImageMagick or GraphicsMagick installed
- Fix: Install GraphicsMagick or Imagemagick I have a Mac and I used `brew install graphicsmagick`

# Changelog

(Top features being developed for v0.7: voice support, Gemini Pro, pin conversations)
Expand Down
Loading