Class: OpenAI::Internal::Type::Unknown Abstract Private

Inherits:
Object
  • Object
show all
Extended by:
Converter, Util::SorbetRuntimeSupport
Defined in:
lib/openai/internal/type/unknown.rb

Overview

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.

This class is abstract.

When we don’t know what to expect for the value.

Class Method Summary collapse

Methods included from Converter

coerce, dump, inspect, inspect, type_info

Methods included from Util::SorbetRuntimeSupport

const_missing, define_sorbet_constant!, sorbet_constant_defined?, to_sorbet_type

Class Method Details

.==(other) ⇒ Boolean

Parameters:

  • other (Object)

Returns:



31
# File 'lib/openai/internal/type/unknown.rb', line 31

def self.==(other) = other.is_a?(Class) && other <= OpenAI::Internal::Type::Unknown

.===(other) ⇒ Boolean

Parameters:

  • other (Object)

Returns:



24
# File 'lib/openai/internal/type/unknown.rb', line 24

def self.===(other) = true

.coerce(value, state:) ⇒ 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.

Parameters:

  • value (Object)
  • state (Hash{Symbol=>Object})

    .

    @option state [Boolean, :strong] :strictness

    @option state [HashSymbol=>Object] :exactness

    @option state [Integer] :branched

Returns:

  • (Object)


47
48
49
50
# File 'lib/openai/internal/type/unknown.rb', line 47

def coerce(value, state:)
  state.fetch(:exactness)[:yes] += 1
  value
end

.dump(value, state: ) ⇒ 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.

Parameters:

  • value (Object)
  • state (Hash{Symbol=>Object}) (defaults to: )

    .

    @option state [Boolean] :can_retry

Returns:

  • (Object)


# File 'lib/openai/internal/type/unknown.rb', line 52

.to_sorbet_typeObject

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:

  • (Object)


66
67
68
# File 'lib/openai/internal/type/unknown.rb', line 66

def to_sorbet_type
  T.anything
end