Skip to content

struct OpenAI::Embedding
inherits Struct #

Included modules

JSON::Serializable

Constructors#

.new(object : String, embedding : Array(Float32), index : Int32)#

View source

.new(pull : JSON::PullParser)#

View source

Methods#

#clone#

View source

#copy_with(object _object = @object, embedding _embedding = @embedding, index _index = @index)#

View source

#dot_product(other : Embedding) : Float32#

View source

#embedding : Array(Float32)#

#index : Int32#

#object : String#