diff options
author | icebaker <113217272+icebaker@users.noreply.github.com> | 2023-06-04 11:54:39 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-04 11:54:39 -0300 |
commit | 60de4884e9ea8908a22978abe2a0c74865173132 (patch) | |
tree | 6154ff90cd8f92cdf3f4c4c246ae7161cc56196f /components/provider.rb | |
parent | 851397413a914e2caee3e05468495dac5076812f (diff) | |
parent | 1c497945d4bbfef5dd44a074800bec83057bcc0a (diff) |
Merge pull request #4 from icebaker/ib-end-user
New spec and end-user flow
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 |