You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dotnet/src/Microsoft.Agents.AI.OpenAI/Extensions/OpenAIAssistantClientExtensions.cs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ public static class OpenAIAssistantClientExtensions
30
30
/// <param name="clientFactory">Provides a way to customize the creation of the underlying <see cref="IChatClient"/> used by the agent.</param>
31
31
/// <param name="services">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param>
32
32
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant.</returns>
33
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
33
34
publicstaticChatClientAgentGetAIAgent(
34
35
thisAssistantClientassistantClient,
35
36
ClientResult<Assistant>assistantClientResult,
@@ -54,6 +55,7 @@ public static ChatClientAgent GetAIAgent(
54
55
/// <param name="clientFactory">Provides a way to customize the creation of the underlying <see cref="IChatClient"/> used by the agent.</param>
55
56
/// <param name="services">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param>
56
57
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant.</returns>
58
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
57
59
publicstaticChatClientAgentGetAIAgent(
58
60
thisAssistantClientassistantClient,
59
61
AssistantassistantMetadata,
@@ -102,6 +104,7 @@ public static ChatClientAgent GetAIAgent(
102
104
/// <param name="services">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param>
103
105
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
104
106
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant agent.</returns>
107
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
105
108
publicstaticChatClientAgentGetAIAgent(
106
109
thisAssistantClientassistantClient,
107
110
stringagentId,
@@ -134,6 +137,7 @@ public static ChatClientAgent GetAIAgent(
134
137
/// <param name="services">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param>
135
138
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
136
139
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant agent.</returns>
140
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
@@ -166,6 +170,7 @@ public static async Task<ChatClientAgent> GetAIAgentAsync(
166
170
/// <param name="services">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param>
167
171
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant.</returns>
168
172
/// <exception cref="ArgumentNullException"><paramref name="assistantClientResult"/> or <paramref name="options"/> is <see langword="null"/>.</exception>
173
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
169
174
publicstaticChatClientAgentGetAIAgent(
170
175
thisAssistantClientassistantClient,
171
176
ClientResult<Assistant>assistantClientResult,
@@ -191,6 +196,7 @@ public static ChatClientAgent GetAIAgent(
191
196
/// <param name="services">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param>
192
197
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant.</returns>
193
198
/// <exception cref="ArgumentNullException"><paramref name="assistantMetadata"/> or <paramref name="options"/> is <see langword="null"/>.</exception>
199
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
194
200
publicstaticChatClientAgentGetAIAgent(
195
201
thisAssistantClientassistantClient,
196
202
AssistantassistantMetadata,
@@ -252,6 +258,7 @@ public static ChatClientAgent GetAIAgent(
252
258
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant agent.</returns>
253
259
/// <exception cref="ArgumentNullException"><paramref name="assistantClient"/> or <paramref name="options"/> is <see langword="null"/>.</exception>
254
260
/// <exception cref="ArgumentException"><paramref name="agentId"/> is empty or whitespace.</exception>
261
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
255
262
publicstaticChatClientAgentGetAIAgent(
256
263
thisAssistantClientassistantClient,
257
264
stringagentId,
@@ -291,6 +298,7 @@ public static ChatClientAgent GetAIAgent(
291
298
/// <returns>A <see cref="ChatClientAgent"/> instance that can be used to perform operations on the assistant agent.</returns>
292
299
/// <exception cref="ArgumentNullException"><paramref name="assistantClient"/> or <paramref name="options"/> is <see langword="null"/>.</exception>
293
300
/// <exception cref="ArgumentException"><paramref name="agentId"/> is empty or whitespace.</exception>
301
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
@@ -333,6 +341,7 @@ public static async Task<ChatClientAgent> GetAIAgentAsync(
333
341
/// <returns>An <see cref="ChatClientAgent"/> instance backed by the OpenAI Assistant service.</returns>
334
342
/// <exception cref="ArgumentNullException">Thrown when <paramref name="client"/> or <paramref name="model"/> is <see langword="null"/>.</exception>
335
343
/// <exception cref="ArgumentException">Thrown when <paramref name="model"/> is empty or whitespace.</exception>
344
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
336
345
publicstaticChatClientAgentCreateAIAgent(
337
346
thisAssistantClientclient,
338
347
stringmodel,
@@ -371,6 +380,7 @@ public static ChatClientAgent CreateAIAgent(
371
380
/// <returns>An <see cref="ChatClientAgent"/> instance backed by the OpenAI Assistant service.</returns>
372
381
/// <exception cref="ArgumentNullException">Thrown when <paramref name="client"/> or <paramref name="model"/> or <paramref name="options"/> is <see langword="null"/>.</exception>
373
382
/// <exception cref="ArgumentException">Thrown when <paramref name="model"/> is empty or whitespace.</exception>
383
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
374
384
publicstaticChatClientAgentCreateAIAgent(
375
385
thisAssistantClientclient,
376
386
stringmodel,
@@ -437,6 +447,7 @@ public static ChatClientAgent CreateAIAgent(
437
447
/// <returns>An <see cref="ChatClientAgent"/> instance backed by the OpenAI Assistant service.</returns>
438
448
/// <exception cref="ArgumentNullException">Thrown when <paramref name="client"/> or <paramref name="model"/> is <see langword="null"/>.</exception>
439
449
/// <exception cref="ArgumentException">Thrown when <paramref name="model"/> is empty or whitespace.</exception>
450
+
[Obsolete("The Assistants API has been deprecated. Please use the Responses API instead.")]
0 commit comments