class LLMrb
Completion backed by the llm.rb gem (https://github.com/llmrb/llm.rb).
The gem is an optional dependency — install it with
bundle config set --local with completions && bundle install.
run Brute::Middleware::Completion::LLMrb.new(
provider: :openai,
provider_options: key: ENV["OPENAI_API_KEY"] ,
model: "gpt-4o-mini",
)
or hand over a fully configured llm.rb provider:
run Brute::Middleware::Completion::LLMrb.new( client: LLM.ollama(key: nil), model: "llama3.2:latest", )
Options:
client: an LLM::Provider instance (takes precedence)
provider: llm.rb constructor name (:openai, :anthropic,
:ollama, :gemini → :google, ...); falls back to
env[:provider]
provider_options: kwargs for the constructor (e.g. key: "..." )
model: model id (falls back to env[:model])
tools: tools list, any shape Tools::Adapter accepts
temperature: sampling temperature (default 0.7)