Class ToolOutput

java.lang.Object
com.azure.ai.openai.assistants.models.ToolOutput
All Implemented Interfaces:
com.azure.json.JsonSerializable<ToolOutput>

public final class ToolOutput extends Object implements com.azure.json.JsonSerializable<ToolOutput>
The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ToolOutput class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static ToolOutput
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ToolOutput from the JsonReader.
    Get the output property: The output from the tool to be submitted.
    Get the toolCallId property: The ID of the tool call being resolved, as provided in the tool calls of a required action from a run.
    setOutput(String output)
    Set the output property: The output from the tool to be submitted.
    setToolCallId(String toolCallId)
    Set the toolCallId property: The ID of the tool call being resolved, as provided in the tool calls of a required action from a run.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • ToolOutput

      public ToolOutput()
      Creates an instance of ToolOutput class.
  • Method Details

    • getToolCallId

      public String getToolCallId()
      Get the toolCallId property: The ID of the tool call being resolved, as provided in the tool calls of a required action from a run.
      Returns:
      the toolCallId value.
    • setToolCallId

      public ToolOutput setToolCallId(String toolCallId)
      Set the toolCallId property: The ID of the tool call being resolved, as provided in the tool calls of a required action from a run.
      Parameters:
      toolCallId - the toolCallId value to set.
      Returns:
      the ToolOutput object itself.
    • getOutput

      public String getOutput()
      Get the output property: The output from the tool to be submitted.
      Returns:
      the output value.
    • setOutput

      public ToolOutput setOutput(String output)
      Set the output property: The output from the tool to be submitted.
      Parameters:
      output - the output value to set.
      Returns:
      the ToolOutput object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ToolOutput>
      Throws:
      IOException
    • fromJson

      public static ToolOutput fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ToolOutput from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ToolOutput if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ToolOutput.