-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Groq.configure docs, add install generator
- Loading branch information
fitttdev
committed
Apr 26, 2024
1 parent
a0fd39e
commit 981b305
Showing
2 changed files
with
29 additions
and
4 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
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,20 @@ | ||
require 'rails/generators/base' | ||
|
||
module Groq | ||
module Generators | ||
class InstallGenerator < Rails::Generators::Base | ||
source_root File.expand_path("templates", __dir__) | ||
|
||
def create_groq_init_file | ||
create_file "config/initializers/groq.rb", <<~RUBY | ||
# frozen_string_literal: true | ||
Groq.configure do |config| | ||
config.api_key = ENV["GROQ_API_KEY"] | ||
config.model_id = "llama3-70b-8192" | ||
end | ||
RUBY | ||
end | ||
end | ||
end | ||
end |