Class ResponsesWebSearchTool

java.lang.Object
com.azure.ai.openai.responses.models.ResponsesTool
com.azure.ai.openai.responses.models.ResponsesWebSearchTool
All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponsesTool>

public final class ResponsesWebSearchTool extends ResponsesTool
The ResponsesWebSearchTool model.
  • Constructor Details

    • ResponsesWebSearchTool

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

    • getType

      public ResponsesToolType getType()
      Get the type property: The type property.
      Overrides:
      getType in class ResponsesTool
      Returns:
      the type value.
    • getUserLocation

      public ResponsesWebSearchLocation getUserLocation()
      Get the userLocation property: The user_location property.
      Returns:
      the userLocation value.
    • setUserLocation

      public ResponsesWebSearchTool setUserLocation(ResponsesWebSearchLocation userLocation)
      Set the userLocation property: The user_location property.
      Parameters:
      userLocation - the userLocation value to set.
      Returns:
      the ResponsesWebSearchTool object itself.
    • getSearchContextSize

      public ResponsesWebSearchContextSize getSearchContextSize()
      Get the searchContextSize property: The search_context_size property.
      Returns:
      the searchContextSize value.
    • setSearchContextSize

      public ResponsesWebSearchTool setSearchContextSize(ResponsesWebSearchContextSize searchContextSize)
      Set the searchContextSize property: The search_context_size property.
      Parameters:
      searchContextSize - the searchContextSize value to set.
      Returns:
      the ResponsesWebSearchTool 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<ResponsesTool>
      Overrides:
      toJson in class ResponsesTool
      Throws:
      IOException
    • fromJson

      public static ResponsesWebSearchTool fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResponsesWebSearchTool from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResponsesWebSearchTool 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 ResponsesWebSearchTool.