Class: OpenAI::Providers::Bedrock::DefaultCredentialsProvider Private
- Inherits:
-
Object
- Object
- OpenAI::Providers::Bedrock::DefaultCredentialsProvider
- Defined in:
- lib/openai/providers/bedrock.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #credentials ⇒ Object private
-
#initialize ⇒ DefaultCredentialsProvider
constructor
private
A new instance of DefaultCredentialsProvider.
Constructor Details
#initialize ⇒ DefaultCredentialsProvider
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DefaultCredentialsProvider.
197 198 199 200 |
# File 'lib/openai/providers/bedrock.rb', line 197 def initialize @mutex = Mutex.new @provider = nil end |
Instance Method Details
#credentials ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
202 203 204 205 206 |
# File 'lib/openai/providers/bedrock.rb', line 202 def credentials provider = @mutex.synchronize { @provider ||= Aws::CredentialProviderChain.new.resolve } raise OpenAI::Errors::Error, MISSING_CREDENTIALS_MESSAGE unless provider Bedrock.validate_credentials!(provider.credentials) end |