Class: Ollama::Documents::Record

Inherits:
JSON::GenericObject
  • Object
show all
Defined in:
lib/ollama/documents.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



31
32
33
# File 'lib/ollama/documents.rb', line 31

def ==(other)
  text == other.text
end

#tags_setObject



27
28
29
# File 'lib/ollama/documents.rb', line 27

def tags_set
  Ollama::Utils::Tags.new(tags, source:)
end

#to_sObject Also known as: inspect



21
22
23
24
25
# File 'lib/ollama/documents.rb', line 21

def to_s
  my_tags = tags_set
  my_tags.empty? or my_tags = " #{my_tags}"
  "#<#{self.class} #{text.inspect}#{my_tags} #{similarity || 'n/a'}>"
end