Class ToolResponse

java.lang.Object
com.google.genkit.ai.ToolResponse

public class ToolResponse extends Object
ToolResponse represents a response from a tool invocation.
  • Constructor Details

    • ToolResponse

      public ToolResponse()
      Default constructor.
    • ToolResponse

      public ToolResponse(String name, Object output)
      Creates a ToolResponse with the given name and output.
      Parameters:
      name - the tool name
      output - the tool output
    • ToolResponse

      public ToolResponse(String ref, String name, Object output)
      Creates a ToolResponse with the given ref, name and output.
      Parameters:
      ref - the reference ID
      name - the tool name
      output - the tool output
  • Method Details

    • getRef

      public String getRef()
    • setRef

      public void setRef(String ref)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getOutput

      public Object getOutput()
    • setOutput

      public void setOutput(Object output)
    • getMetadata

      public Map<String,Object> getMetadata()
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)