Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions rbi/lib/openai/base_model.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ module OpenAI

# When we don't know what to expect for the value.
class Unknown
abstract!

extend OpenAI::Converter

abstract!

sig { params(other: T.anything).returns(T::Boolean) }
def self.===(other)
end
Expand Down Expand Up @@ -116,10 +116,10 @@ module OpenAI

# Ruby has no Boolean class; this is something for models to refer to.
class BooleanModel
abstract!

extend OpenAI::Converter

abstract!

sig { params(other: T.anything).returns(T::Boolean) }
def self.===(other)
end
Expand Down Expand Up @@ -161,10 +161,10 @@ module OpenAI
# We can therefore convert string values to Symbols, but can't convert other
# values safely.
class Enum
abstract!

extend OpenAI::Converter

abstract!

class << self
# All of the valid Symbol values for this enum.
sig { overridable.returns(T::Array[T.any(NilClass, T::Boolean, Integer, Float, Symbol)]) }
Expand Down Expand Up @@ -210,10 +210,10 @@ module OpenAI
end

class Union
abstract!

extend OpenAI::Converter

abstract!

class << self
# @api private
#
Expand Down Expand Up @@ -295,10 +295,10 @@ module OpenAI

# Array of items of a given type.
class ArrayOf
abstract!

include OpenAI::Converter

abstract!

sig { params(other: T.anything).returns(T::Boolean) }
def ===(other)
end
Expand Down Expand Up @@ -357,10 +357,10 @@ module OpenAI

# Hash of items of a given type.
class HashOf
abstract!

include OpenAI::Converter

abstract!

sig { params(other: T.anything).returns(T::Boolean) }
def ===(other)
end
Expand Down Expand Up @@ -418,10 +418,10 @@ module OpenAI
end

class BaseModel
abstract!

extend OpenAI::Converter

abstract!

KnownFieldShape = T.type_alias { {mode: T.nilable(Symbol), required: T::Boolean} }

class << self
Expand Down