Class: SkillBench::Client
- Inherits:
-
Object
- Object
- SkillBench::Client
- Defined in:
- lib/skill_bench/client.rb
Overview
Facade for calling LLM clients. Delegates to the configured provider.
Class Method Summary collapse
-
.call(system_prompt:, messages:, provider: nil, **options) ⇒ Hash
Calls the configured LLM provider with the given parameters.
Class Method Details
.call(system_prompt:, messages:, provider: nil, **options) ⇒ Hash
Calls the configured LLM provider with the given parameters.
16 17 18 19 20 21 |
# File 'lib/skill_bench/client.rb', line 16 def self.call(system_prompt:, messages:, provider: nil, **) resolved = provider || Config.current_llm_provider || :openai client_class = Clients::ProviderRegistry.for(resolved) warn "WARNING: LLM provider '#{resolved}' is not configured. Falling back to null client." if client_class == Clients::Providers::NullClient client_class.call(system_prompt: system_prompt, messages: , **) end |