Class: Roseflow::VectorStores::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/roseflow/vector_stores/base.rb

Direct Known Subclasses

HNSWMemoryStore

Instance Method Summary collapse

Instance Method Details

#build_vector(id, attrs) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/roseflow/vector_stores/base.rb', line 14

def build_vector(id, attrs)
  raise NotImplementedError, "You must implement the #build_vector method in your vector store"
end

#create_vector(vector) ⇒ Object

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/roseflow/vector_stores/base.rb', line 18

def create_vector(vector)
  raise NotImplementedError, "You must implement the #create_vector method in your vector store"
end

#delete_vector(name) ⇒ Object

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/roseflow/vector_stores/base.rb', line 22

def delete_vector(name)
  raise NotImplementedError, "You must implement the #delete_vector method in your vector store"
end

#find(query) ⇒ Object

Raises:

  • (NotImplementedError)


34
35
36
# File 'lib/roseflow/vector_stores/base.rb', line 34

def find(query)
  raise NotImplementedError, "You must implement the #find method in your vector store"
end

#has_embeddings?(klass) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/roseflow/vector_stores/base.rb', line 6

def has_embeddings?(klass)
  false
end

#list_vectors(namespace = nil) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/roseflow/vector_stores/base.rb', line 10

def list_vectors(namespace = nil)
  raise NotImplementedError, "You must implement the #list_vectors method in your vector store"
end

#query(query) ⇒ Object

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/roseflow/vector_stores/base.rb', line 30

def query(query)
  raise NotImplementedError, "You must implement the #query method in your vector store"
end

#update_vector(vector) ⇒ Object

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/roseflow/vector_stores/base.rb', line 26

def update_vector(vector)
  raise NotImplementedError, "You must implement the #update_vector method in your vector store"
end