Module: OpenAI::Internal::Provider

Defined in:
lib/openai/internal/provider.rb,
sig/openai/internal/provider.rbs

Overview

Private registry for OpenAI-owned provider configurations.

Provider factories return opaque OpenAI::Provider instances whose public representation does not expose their definition.

Defined Under Namespace

Classes: Runtime

Constant Summary collapse

OpenAI =

Returns:

  • (:Provider provider)

Class Method Summary collapse

Class Method Details

.configure(provider) ⇒ 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.



22
# File 'lib/openai/internal/provider.rb', line 22

def configure(provider) = definition(provider).configure

.create(definition) ⇒ 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.



14
15
16
# File 'lib/openai/internal/provider.rb', line 14

def create(definition)
  OpenAI::Provider.send(:new, definition.freeze).freeze
end

.name(provider) ⇒ String

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.

Parameters:

Returns:

  • (String)


19
# File 'lib/openai/internal/provider.rb', line 19

def name(provider) = definition(provider).name