Class: Roseflow::Pinecone::Vector::Query

Inherits:
PineconeObject show all
Includes:
Roseflow::Pinecone::Vectors::Common
Defined in:
lib/roseflow/pinecone/vectors/query.rb

Defined Under Namespace

Classes: QueryContract

Class Method Summary collapse

Methods included from Roseflow::Pinecone::Vectors::Common

extended, included, #to_json

Class Method Details

.new(input) ⇒ Object



46
47
48
49
50
51
52
53
# File 'lib/roseflow/pinecone/vectors/query.rb', line 46

def self.new(input)
  validation = self.contract_object.new.call(input)
  if validation.success?
    super(input)
  else
    raise ArgumentError.new(validation.errors.to_h.inspect)
  end
end