Skip to content

Commit

Permalink
CodeGen from PR 28786 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 11424aa0dd21b06cfe7d214eaddb6877e23edd07 into c740a1cb0cc3f2eb63b5f83723fbf3593aad1451
  • Loading branch information
SDKAuto committed Apr 23, 2024
1 parent ecfbba2 commit 0ce2738
Show file tree
Hide file tree
Showing 120 changed files with 3,920 additions and 3,689 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3158,4 +3158,34 @@ public Mono<byte[]> getFileContent(String fileId) {
return getFileContentWithResponse(fileId, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(byte[].class));
}

/**
* Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a
* status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.
*
* @param threadId The ID of the thread that was run.
* @param runId The ID of the run that requires tool outputs.
* @param toolOutputs The list of tool outputs requested by tool calls from the specified run.
* @param stream If `true`, returns a stream of events that happen during the Run as server-sent events, terminating
* when the Run enters a terminal state with a `data: [DONE]` message.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data representing a single evaluation run of an assistant thread on successful completion of
* {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ThreadRun> submitToolOutputsToRun(String threadId, String runId, List<ToolOutput> toolOutputs,
Boolean stream) {
// Generated convenience method for submitToolOutputsToRunWithResponse
RequestOptions requestOptions = new RequestOptions();
SubmitToolOutputsToRunRequest requestObj = new SubmitToolOutputsToRunRequest(toolOutputs).setStream(stream);
BinaryData request = BinaryData.fromObject(requestObj);
return submitToolOutputsToRunWithResponse(threadId, runId, request, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(ThreadRun.class));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3096,4 +3096,33 @@ public byte[] getFileContent(String fileId) {
RequestOptions requestOptions = new RequestOptions();
return getFileContentWithResponse(fileId, requestOptions).getValue().toObject(byte[].class);
}

/**
* Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a
* status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.
*
* @param threadId The ID of the thread that was run.
* @param runId The ID of the run that requires tool outputs.
* @param toolOutputs The list of tool outputs requested by tool calls from the specified run.
* @param stream If `true`, returns a stream of events that happen during the Run as server-sent events, terminating
* when the Run enters a terminal state with a `data: [DONE]` message.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data representing a single evaluation run of an assistant thread.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public ThreadRun submitToolOutputsToRun(String threadId, String runId, List<ToolOutput> toolOutputs,
Boolean stream) {
// Generated convenience method for submitToolOutputsToRunWithResponse
RequestOptions requestOptions = new RequestOptions();
SubmitToolOutputsToRunRequest requestObj = new SubmitToolOutputsToRunRequest(toolOutputs).setStream(stream);
BinaryData request = BinaryData.fromObject(requestObj);
return submitToolOutputsToRunWithResponse(threadId, runId, request, requestOptions).getValue()
.toObject(ThreadRun.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ public enum AssistantsServiceVersion implements ServiceVersion {
/**
* Enum value 2024-02-15-preview.
*/
V2024_02_15_PREVIEW("2024-02-15-preview");
V2024_02_15_PREVIEW("2024-02-15-preview"),

/**
* Enum value placeholder-for-future-release.
*/
VPLACEHOLDER_FOR_FUTURE_RELEASE("placeholder-for-future-release");

private final String version;

Expand All @@ -35,6 +40,6 @@ public String getVersion() {
* @return The latest {@link AssistantsServiceVersion}.
*/
public static AssistantsServiceVersion getLatest() {
return V2024_02_15_PREVIEW;
return VPLACEHOLDER_FOR_FUTURE_RELEASE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1991,6 +1991,10 @@ public Response<BinaryData> deleteThreadWithResponse(String threadId, RequestOpt
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2051,6 +2055,10 @@ public Mono<Response<BinaryData>> createMessageWithResponseAsync(String threadId
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2114,6 +2122,10 @@ public Response<BinaryData> createMessageWithResponse(String threadId, BinaryDat
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2182,6 +2194,10 @@ public Mono<Response<BinaryData>> listMessagesWithResponseAsync(String threadId,
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2228,6 +2244,10 @@ public Response<BinaryData> listMessagesWithResponse(String threadId, RequestOpt
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2273,6 +2293,10 @@ public Mono<Response<BinaryData>> getMessageWithResponseAsync(String threadId, S
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2326,6 +2350,10 @@ public Response<BinaryData> getMessageWithResponse(String threadId, String messa
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2382,6 +2410,10 @@ public Mono<Response<BinaryData>> updateMessageWithResponseAsync(String threadId
* object: String (Required)
* created_at: long (Required)
* thread_id: String (Required)
* status: String(in_progress/incomplete/completed) (Required)
* incomplete_details: String(content_filter/max_tokens/run_cancelled/run_failed) (Required)
* completed_at: Long (Required)
* incomplete_at: Long (Required)
* role: String(user/assistant) (Required)
* content (Required): [
* (Required){
Expand Down Expand Up @@ -2606,6 +2638,7 @@ public Response<BinaryData> getMessageFileWithResponse(String threadId, String m
* type: String (Required)
* }
* ]
* stream: Boolean (Optional)
* metadata (Optional): {
* String: String (Required)
* }
Expand Down Expand Up @@ -2683,6 +2716,7 @@ public Mono<Response<BinaryData>> createRunWithResponseAsync(String threadId, Bi
* type: String (Required)
* }
* ]
* stream: Boolean (Optional)
* metadata (Optional): {
* String: String (Required)
* }
Expand Down Expand Up @@ -3167,6 +3201,7 @@ public Response<BinaryData> updateRunWithResponse(String threadId, String runId,
* output: String (Optional)
* }
* ]
* stream: Boolean (Optional)
* }
* }</pre>
*
Expand Down Expand Up @@ -3240,6 +3275,7 @@ public Mono<Response<BinaryData>> submitToolOutputsToRunWithResponseAsync(String
* output: String (Optional)
* }
* ]
* stream: Boolean (Optional)
* }
* }</pre>
*
Expand Down Expand Up @@ -3443,6 +3479,7 @@ public Response<BinaryData> cancelRunWithResponse(String threadId, String runId,
* type: String (Required)
* }
* ]
* stream: Boolean (Optional)
* metadata (Optional): {
* String: String (Required)
* }
Expand Down Expand Up @@ -3535,6 +3572,7 @@ public Mono<Response<BinaryData>> createThreadAndRunWithResponseAsync(BinaryData
* type: String (Required)
* }
* ]
* stream: Boolean (Optional)
* metadata (Optional): {
* String: String (Required)
* }
Expand Down
Loading

0 comments on commit 0ce2738

Please sign in to comment.