Skip to content

Commit 14cbb4a

Browse files
authored
Fix the issie with inability to deserialize RunStep when files earch is used. (Azure#47858)
1 parent 229349b commit 14cbb4a

32 files changed

+1910
-162
lines changed

sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs

Lines changed: 150 additions & 33 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs

Lines changed: 150 additions & 33 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.Streaming.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ internal async Task<Response> CreateRunStreamingAsync(string threadId, RequestCo
173173
scope.Start();
174174
try
175175
{
176-
using HttpMessage message = CreateCreateRunRequest(threadId, content, context);
176+
using HttpMessage message = CreateCreateRunRequest(threadId, content, null, context);
177177
message.BufferResponse = false;
178178
return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
179179
}
@@ -193,7 +193,7 @@ internal Response CreateRunStreaming(string threadId, RequestContent content, Re
193193
scope.Start();
194194
try
195195
{
196-
using HttpMessage message = CreateCreateRunRequest(threadId, content, context);
196+
using HttpMessage message = CreateCreateRunRequest(threadId, content, null, context);
197197
message.BufferResponse = false;
198198
return _pipeline.ProcessMessage(message, context);
199199
}

sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupNam
108108
/// <param name="cancellationToken"> The cancellation token to use. </param>
109109
/// <returns> A new <see cref="ThreadRun"/> instance. </returns>
110110
public virtual Response<ThreadRun> CreateRun(AgentThread thread, Agent agent, CancellationToken cancellationToken = default)
111-
=> CreateRun(thread.Id, agent.Id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, cancellationToken);
111+
=> CreateRun(thread.Id, agent.Id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, cancellationToken);
112112

113113
/// <summary>
114114
/// Creates a new run of the specified thread using a specified agent.
@@ -121,7 +121,7 @@ public virtual Response<ThreadRun> CreateRun(AgentThread thread, Agent agent, Ca
121121
/// <param name="cancellationToken"> The cancellation token to use. </param>
122122
/// <returns> A new <see cref="ThreadRun"/> instance. </returns>
123123
public virtual Task<Response<ThreadRun>> CreateRunAsync(AgentThread thread, Agent agent, CancellationToken cancellationToken = default)
124-
=> CreateRunAsync(thread.Id, agent.Id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, cancellationToken);
124+
=> CreateRunAsync(thread.Id, agent.Id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, cancellationToken);
125125

126126
/// <summary> Returns a list of run steps associated an agent thread run. </summary>
127127
/// <param name="run"> The <see cref="ThreadRun"/> instance from which run steps should be listed. </param>
@@ -433,7 +433,7 @@ Response<InternalOpenAIPageableListOfAgent> baseResponse
433433
return Response.FromValue(PageableList<Agent>.Create(baseResponse.Value), baseResponse.GetRawResponse());
434434
}
435435

436-
/// <inheritdoc cref="InternalGetRunSteps(string, string, int?, ListSortOrder?, string, string, CancellationToken)"/>
436+
/// <inheritdoc cref="InternalGetRunSteps(string, string, IEnumerable&lt;RunAdditionalFieldList&gt;, int?, ListSortOrder?, string, string, CancellationToken)"/>
437437
public virtual Response<PageableList<RunStep>> GetRunSteps(
438438
string threadId,
439439
string runId,
@@ -445,11 +445,11 @@ public virtual Response<PageableList<RunStep>> GetRunSteps(
445445
{
446446
using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetRunSteps");
447447
scope.Start();
448-
Response<InternalOpenAIPageableListOfRunStep> baseResponse = InternalGetRunSteps(threadId, runId, limit, order, after, before, cancellationToken);
448+
Response<InternalOpenAIPageableListOfRunStep> baseResponse = InternalGetRunSteps(threadId, runId, null, limit, order, after, before, cancellationToken);
449449
return Response.FromValue(PageableList<RunStep>.Create(baseResponse.Value), baseResponse.GetRawResponse());
450450
}
451451

452-
/// <inheritdoc cref="InternalGetRunStepsAsync(string, string, int?, ListSortOrder?, string, string, CancellationToken)"/>
452+
/// <inheritdoc cref="InternalGetRunStepsAsync(string, string, IEnumerable&lt;RunAdditionalFieldList&gt;, int?, ListSortOrder?, string, string, CancellationToken)"/>
453453
public virtual async Task<Response<PageableList<RunStep>>> GetRunStepsAsync(
454454
string threadId,
455455
string runId,
@@ -462,7 +462,7 @@ public virtual async Task<Response<PageableList<RunStep>>> GetRunStepsAsync(
462462
using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetRunSteps");
463463
scope.Start();
464464
Response<InternalOpenAIPageableListOfRunStep> baseResponse
465-
= await InternalGetRunStepsAsync(threadId, runId, limit, order, after, before, cancellationToken).ConfigureAwait(false);
465+
= await InternalGetRunStepsAsync(threadId, runId, null, limit, order, after, before, cancellationToken).ConfigureAwait(false);
466466
return Response.FromValue(PageableList<RunStep>.Create(baseResponse.Value), baseResponse.GetRawResponse());
467467
}
468468

sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs

Lines changed: 44 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)