Package com.azure.ai.agents.persistent
Class RunStepsClient
java.lang.Object
com.azure.ai.agents.persistent.RunStepsClient
Initializes a new instance of the synchronous PersistentAgentsAdministrationClient type.
-
Method Summary
Modifier and TypeMethodDescriptiongetRunStep(String threadId, String runId, String stepId) Retrieves a single run step from a thread run.getRunStep(String threadId, String runId, String stepId, List<RunAdditionalFieldList> include) Retrieves a single run step from a thread run.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getRunStepWithResponse(String threadId, String runId, String stepId, com.azure.core.http.rest.RequestOptions requestOptions) Retrieves a single run step from a thread run.com.azure.core.http.rest.PagedIterable<RunStep> listRunSteps(String threadId, String runId) Gets a list of run steps from a thread run.com.azure.core.http.rest.PagedIterable<com.azure.core.util.BinaryData> listRunSteps(String threadId, String runId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a list of run steps from a thread run.com.azure.core.http.rest.PagedIterable<RunStep> listRunSteps(String threadId, String runId, List<RunAdditionalFieldList> include, Integer limit, ListSortOrder order, String after, String before) Gets a list of run steps from a thread run.
-
Method Details
-
getRunStepWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getRunStepWithResponse(String threadId, String runId, String stepId, com.azure.core.http.rest.RequestOptions requestOptions) Retrieves a single run step from a thread run.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description include[] List<String> No A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. In the form of "," separated string. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ id: String (Required) object: String (Required) type: String(message_creation/tool_calls) (Required) assistant_id: String (Required) thread_id: String (Required) run_id: String (Required) status: String(in_progress/cancelled/failed/completed/expired) (Required) step_details (Required): { type: String(message_creation/tool_calls) (Required) } last_error (Required): { code: String(server_error/rate_limit_exceeded) (Required) message: String (Required) } created_at: long (Required) expired_at: Long (Required) completed_at: Long (Required) cancelled_at: Long (Required) failed_at: Long (Required) usage (Optional): { completion_tokens: long (Required) prompt_tokens: long (Required) total_tokens: long (Required) } metadata (Required): { String: String (Required) } }- Parameters:
threadId- Identifier of the thread.runId- Identifier of the run.stepId- Identifier of the run step.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- detailed information about a single step of an agent thread run along with
Response. - 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.
-
getRunStep
public RunStep getRunStep(String threadId, String runId, String stepId, List<RunAdditionalFieldList> include) Retrieves a single run step from a thread run.- Parameters:
threadId- Identifier of the thread.runId- Identifier of the run.stepId- Identifier of the run step.include- A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.- Returns:
- detailed information about a single step of an agent thread run.
- 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.
-
getRunStep
Retrieves a single run step from a thread run.- Parameters:
threadId- Identifier of the thread.runId- Identifier of the run.stepId- Identifier of the run step.- Returns:
- detailed information about a single step of an agent thread run.
- 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.
-
listRunSteps
public com.azure.core.http.rest.PagedIterable<RunStep> listRunSteps(String threadId, String runId, List<RunAdditionalFieldList> include, Integer limit, ListSortOrder order, String after, String before) Gets a list of run steps from a thread run.- Parameters:
threadId- Identifier of the thread.runId- Identifier of the run.include- A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.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.after- A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.before- A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.- Returns:
- a list of run steps from a thread run as paginated response with
PagedIterable. - 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.
-
listRunSteps
Gets a list of run steps from a thread run.- Parameters:
threadId- Identifier of the thread.runId- Identifier of the run.- Returns:
- a list of run steps from a thread run as paginated response with
PagedIterable. - 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.
-
listRunSteps
public com.azure.core.http.rest.PagedIterable<com.azure.core.util.BinaryData> listRunSteps(String threadId, String runId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a list of run steps from a thread run.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description include[] List<String> No A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. In the form of "," separated string. limit Integer No A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. order String No Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc", "desc". after String No A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. before String No A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ id: String (Required) object: String (Required) type: String(message_creation/tool_calls) (Required) assistant_id: String (Required) thread_id: String (Required) run_id: String (Required) status: String(in_progress/cancelled/failed/completed/expired) (Required) step_details (Required): { type: String(message_creation/tool_calls) (Required) } last_error (Required): { code: String(server_error/rate_limit_exceeded) (Required) message: String (Required) } created_at: long (Required) expired_at: Long (Required) completed_at: Long (Required) cancelled_at: Long (Required) failed_at: Long (Required) usage (Optional): { completion_tokens: long (Required) prompt_tokens: long (Required) total_tokens: long (Required) } metadata (Required): { String: String (Required) } }- Parameters:
threadId- Identifier of the thread.runId- Identifier of the run.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of run steps from a thread run as paginated response with
PagedIterable. - 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.
-