Class ResponsesAsyncClient

java.lang.Object
com.azure.ai.openai.responses.ResponsesAsyncClient

public final class ResponsesAsyncClient extends Object
Initializes a new instance of the asynchronous ResponsesClient type.
  • Method Details

    • getResponse

      public Mono<ResponsesResponse> getResponse(String responseId, List<CreateResponsesRequestIncludable> includables)
      Retrieves a model response with the given ID.
      Parameters:
      responseId - The ID of the response to retrieve.
      includables - The includables parameter.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getResponse

      public Mono<ResponsesResponse> getResponse(String responseId)
      Retrieves a model response with the given ID.
      Parameters:
      responseId - The ID of the response to retrieve.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createResponse

      public Mono<ResponsesResponse> createResponse(CreateResponsesRequest requestBody)
      Creates a model response.
      Parameters:
      requestBody - The requestBody parameter.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createResponse

      public Mono<ResponsesResponse> createResponse(CreateResponsesRequest requestBody, com.azure.core.http.rest.RequestOptions requestOptions)
      Creates a model response.
      Parameters:
      requestBody - The requestBody parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createResponseStream

      public Flux<ResponsesStreamEvent> createResponseStream(CreateResponsesRequest requestBody)
      Creates a model response.
      Parameters:
      requestBody - The requestBody parameter.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createResponseStream

      public Flux<ResponsesStreamEvent> createResponseStream(CreateResponsesRequest requestBody, com.azure.core.http.rest.RequestOptions requestOptions)
      Creates a model response.
      Parameters:
      requestBody - The requestBody parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteResponse

      public Mono<DeleteResponseResponse> deleteResponse(String responseId, com.azure.core.http.rest.RequestOptions requestOptions)
      Deletes a response by ID.
      Parameters:
      responseId - The responseId parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
    • deleteResponse

      public Mono<DeleteResponseResponse> deleteResponse(String responseId)
      Deletes a response by ID.
      Parameters:
      responseId - The responseId parameter.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
    • listInputItems

      public com.azure.core.http.rest.PagedFlux<ResponsesItem> listInputItems(String responseId, Integer limit, ListInputItemsRequestOrder order)
      Returns a list of input items for a given response.
      Parameters:
      responseId - The ID of the response to retrieve.
      limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
      order - Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` for descending order.
      Returns:
      the response body on successful completion of Mono.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      com.azure.core.exception.ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      com.azure.core.exception.ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      com.azure.core.exception.ResourceModifiedException - thrown if the request is rejected by server on status code 409.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.