From f040b90d9601f6a65e7a5c94df70ea0f18066467 Mon Sep 17 00:00:00 2001 From: Dr Nic Williams Date: Sat, 27 Apr 2024 06:17:48 +1000 Subject: [PATCH] Generator is for Rails apps --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e927149..7cca275 100644 --- a/README.md +++ b/README.md @@ -75,11 +75,6 @@ gem install groq - Place in env var `GROQ_API_KEY`, or explicitly pass into configuration below. - Use the `Groq::Client` to interact with Groq and your favourite model. -```plain -rails g groq:install -``` -to generate inializer file - ```ruby client = Groq::Client.new # uses ENV["GROQ_API_KEY"] and "llama3-8b-8192" client = Groq::Client.new(api_key: "...", model_id: "llama3-8b-8192") @@ -91,6 +86,12 @@ end client = Groq::Client.new ``` +In a Rails application, you can generate a `config/initializer/groq.rb` file with: + +```plain +rails g groq:install +``` + There is a simple chat function to send messages to a model: ```ruby