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.



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

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.



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

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)


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

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