diff options
Diffstat (limited to 'components/provider.rb')
-rw-r--r-- | components/provider.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/provider.rb b/components/provider.rb index 3138cc4..163b099 100644 --- a/components/provider.rb +++ b/components/provider.rb @@ -8,11 +8,11 @@ module NanoBot module Components class Provider def self.new(provider, environment: {}) - case provider[:name] + case provider[:id] when 'openai' - Providers::OpenAI.new(provider[:settings], environment:) + Providers::OpenAI.new(provider[:settings], provider[:credentials], environment:) else - raise "Unsupported provider #{provider[:name]}" + raise "Unsupported provider \"#{provider[:id]}\"" end end end |