Module: Langchain::ToolDefinition::InstanceMethods

Defined in:
lib/langchain/tool_definition.rb

Instance Method Summary collapse

Instance Method Details

#tool_response(content: nil, image_url: nil) ⇒ Langchain::ToolResponse

Create a tool response

Parameters:

  • content (String, nil) (defaults to: nil)

    The content of the tool response

  • image_url (String, nil) (defaults to: nil)

    The URL of an image

Returns:

[View source]

73
74
75
# File 'lib/langchain/tool_definition.rb', line 73

def tool_response(content: nil, image_url: nil)
  Langchain::ToolResponse.new(content: content, image_url: image_url)
end