Class OllamaToolResponse

java.lang.Object
me.neurodock.ollama.OllamaMessage
me.neurodock.ollama.OllamaToolResponse

public class OllamaToolResponse extends OllamaMessage
Represents a response from a tool.
  • Constructor Details

    • OllamaToolResponse

      public OllamaToolResponse(String tool, String response)
      Creates a new instance of OllamaToolResponse.
      Parameters:
      tool - The tool that responded
      response - The response from the tool
  • Method Details

    • empty

      public static OllamaToolResponse empty(String tool)
      Returns an empty tool response See empty(String, String) for a reasoned/described response
      Parameters:
      tool - The tool that responded
      Returns:
      an empty tool response
    • empty

      public static OllamaToolResponse empty(String tool, String description)
      Returns an empty tool response with a reason/description. See empty(String) for reason/description less response
      Parameters:
      tool - The tool that responded
      description - A description for why this is empty
      Returns:
      an empty tool response with a reason
    • getTool

      public String getTool()
      Gets the tool that responded.
      Returns:
      The tool that responded
    • getResponse

      public String getResponse()
      Gets the response from the tool.
      Returns:
      The response from the tool