Class: Boxcars::VectorStore::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/boxcars/vector_store/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fields = {}) ⇒ Document

Returns a new instance of Document.



8
9
10
11
12
# File 'lib/boxcars/vector_store/document.rb', line 8

def initialize(fields = {})
  @content = fields[:content] || ""
  @embedding = fields[:embedding] || []
  @metadata = fields[:metadata] || {}
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



6
7
8
# File 'lib/boxcars/vector_store/document.rb', line 6

def content
  @content
end

#embeddingObject

Returns the value of attribute embedding.



6
7
8
# File 'lib/boxcars/vector_store/document.rb', line 6

def embedding
  @embedding
end

#metadataObject

Returns the value of attribute metadata.



6
7
8
# File 'lib/boxcars/vector_store/document.rb', line 6

def 
  @metadata
end