Class: Copilot::ToolBinaryResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

A binary payload returned by a tool.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



26
27
28
# File 'lib/copilot/types.rb', line 26

def data
  @data
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



26
27
28
# File 'lib/copilot/types.rb', line 26

def description
  @description
end

#mime_typeObject

Returns the value of attribute mime_type

Returns:

  • (Object)

    the current value of mime_type



26
27
28
# File 'lib/copilot/types.rb', line 26

def mime_type
  @mime_type
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



26
27
28
# File 'lib/copilot/types.rb', line 26

def type
  @type
end

Instance Method Details

#to_hObject



30
31
32
33
34
# File 'lib/copilot/types.rb', line 30

def to_h
  h = { data: data, mimeType: mime_type, type: type }
  h[:description] = description if description
  h
end