Class: Boxcars::VectorStore::Document
- Inherits:
-
Object
- Object
- Boxcars::VectorStore::Document
- Defined in:
- lib/boxcars/vector_store/document.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#embedding ⇒ Object
Returns the value of attribute embedding.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(fields = {}) ⇒ Document
constructor
A new instance of Document.
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
#content ⇒ Object
Returns the value of attribute content.
6 7 8 |
# File 'lib/boxcars/vector_store/document.rb', line 6 def content @content end |
#embedding ⇒ Object
Returns the value of attribute embedding.
6 7 8 |
# File 'lib/boxcars/vector_store/document.rb', line 6 def @embedding end |
#metadata ⇒ Object
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/boxcars/vector_store/document.rb', line 6 def @metadata end |