Class: Llmemory::LLM::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/llmemory/llm/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, usage: Usage.zero) ⇒ Response

Returns a new instance of Response.



8
9
10
11
# File 'lib/llmemory/llm/response.rb', line 8

def initialize(content, usage: Usage.zero)
  @content = content.to_s
  @usage = usage
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/llmemory/llm/response.rb', line 6

def content
  @content
end

#usageObject (readonly)

Returns the value of attribute usage.



6
7
8
# File 'lib/llmemory/llm/response.rb', line 6

def usage
  @usage
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/llmemory/llm/response.rb', line 13

def to_s
  @content
end