Module: Omakase
- Defined in:
- lib/omakase.rb,
lib/omakase/doc.rb,
lib/omakase/mcp.rb,
lib/omakase/type.rb,
lib/omakase/agent.rb,
lib/omakase/schema.rb,
lib/omakase/skills.rb,
lib/omakase/request.rb,
lib/omakase/version.rb,
lib/omakase/executor.rb,
lib/omakase/fake_chat.rb,
lib/omakase/generation.rb,
lib/omakase/strategies.rb,
lib/omakase/tools/ruby.rb,
lib/omakase/capabilities.rb,
lib/omakase/strategies/predict.rb,
lib/omakase/strategies/code_act.rb
Defined Under Namespace
Modules: Capabilities, Doc, Executor, MCP, Skills, Strategies, Tools Classes: Agent, FakeChat, Generation, Request, Schema, Type
Constant Summary collapse
- Error =
Class.new(StandardError)
- ContractError =
The answer did not match the declared return type.
Class.new(Error)
- ProviderError =
The model or its provider failed. RubyLLM has already retried what it retries.
Class.new(Error)
- VERSION =
"0.0.2.alpha"
Class Attribute Summary collapse
Class Method Summary collapse
-
.configure ⇒ Object
Providers, keys, default model, timeouts, logging — all of it is RubyLLM's.
-
.configure_from_env(env = ENV) ⇒ Object
Reads every provider credential RubyLLM knows from the environment: ANTHROPIC_API_KEY, OPENROUTER_API_KEY, OLLAMA_API_BASE, VERTEXAI_PROJECT_ID, ….
- .provider_options ⇒ Object
Class Attribute Details
.executor ⇒ Object
51 |
# File 'lib/omakase.rb', line 51 def executor = @executor ||= Executor |
Class Method Details
.configure ⇒ Object
Providers, keys, default model, timeouts, logging — all of it is RubyLLM's.
27 |
# File 'lib/omakase.rb', line 27 def configure(&) = RubyLLM.configure(&) |
.configure_from_env(env = ENV) ⇒ Object
Reads every provider credential RubyLLM knows from the environment: ANTHROPIC_API_KEY, OPENROUTER_API_KEY, OLLAMA_API_BASE, VERTEXAI_PROJECT_ID, …
31 32 33 34 35 36 37 38 |
# File 'lib/omakase.rb', line 31 def configure_from_env(env = ENV) configure do |config| .each do |option| value = env[option.to_s.upcase] config.public_send(:"#{option}=", value) if value end end end |
.provider_options ⇒ Object
40 41 42 43 44 45 |
# File 'lib/omakase.rb', line 40 def slugs = RubyLLM::Provider.providers.keys RubyLLM::Configuration..select do |option| slugs.any? { |slug| option.to_s.start_with?("#{slug}_") } end end |