Class: Octoryn::ToolCall

Inherits:
Data
  • Object
show all
Defined in:
lib/octoryn/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



15
16
17
# File 'lib/octoryn/types.rb', line 15

def arguments
  @arguments
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



15
16
17
# File 'lib/octoryn/types.rb', line 15

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



15
16
17
# File 'lib/octoryn/types.rb', line 15

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



15
16
17
# File 'lib/octoryn/types.rb', line 15

def type
  @type
end

Instance Method Details

#decode_inputObject

Raises:

  • (JSON::ParserError)


16
17
18
19
20
21
# File 'lib/octoryn/types.rb', line 16

def decode_input
  value = JSON.parse(arguments)
  raise JSON::ParserError, 'tool arguments must be an object' unless value.is_a?(Hash)

  value
end