diff --git a/README.md b/README.md index e927149..72706c6 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 @@ -109,8 +110,10 @@ client.chat([ ### Interactive console (IRb) -> bin/console +```plain +bin/console ``` + This repository has a `bin/console` script to start an interactive console to play with the Groq API. The `@client` variable is setup using `$GROQ_API_KEY` environment variable; and the `U`, `A`, `T` helpers are already included. ```ruby