Class: OpenAI::Providers::Azure::Definition Private
- Inherits:
-
Object
- Object
- OpenAI::Providers::Azure::Definition
- Defined in:
- lib/openai/providers/azure.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 Attribute Summary collapse
- #name ⇒ Object readonly private
Instance Method Summary collapse
- #configure ⇒ Object private
-
#initialize(base_url:, credential_provider:, authentication:) ⇒ Definition
constructor
private
A new instance of Definition.
Constructor Details
#initialize(base_url:, credential_provider:, authentication:) ⇒ Definition
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 Definition.
18 19 20 21 22 23 |
# File 'lib/openai/providers/azure.rb', line 18 def initialize(base_url:, credential_provider:, authentication:) @name = "azure" @base_url = base_url.freeze @credential_provider = credential_provider @authentication = authentication end |
Instance Attribute Details
#name ⇒ Object (readonly)
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.
16 17 18 |
# File 'lib/openai/providers/azure.rb', line 16 def name @name end |
Instance Method Details
#configure ⇒ 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.
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/openai/providers/azure.rb', line 25 def configure auth = Auth.new( base_url: @base_url, credential_provider: @credential_provider, authentication: @authentication ) OpenAI::Internal::Provider::Runtime.new( name: name, base_url: @base_url, prepare_request: auth.method(:prepare_request), authentication_headers: AUTH_HEADERS ) end |