Class: LLM::Function::Return

Inherits:
Struct
  • Object
show all
Defined in:
lib/llm/function.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



40
41
42
# File 'lib/llm/function.rb', line 40

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



40
41
42
# File 'lib/llm/function.rb', line 40

def name
  @name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



40
41
42
# File 'lib/llm/function.rb', line 40

def value
  @value
end

Instance Method Details

#to_hHash

Returns a Hash representation of LLM::Function::Return

Returns:

  • (Hash)


44
45
46
# File 'lib/llm/function.rb', line 44

def to_h
  {id:, name:, value:}
end

#to_jsonString

Returns:

  • (String)


50
51
52
# File 'lib/llm/function.rb', line 50

def to_json(...)
  LLM.json.dump(to_h, ...)
end