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
.Net: Add date to obsolete messages for when to expect these methods to be deleted. (#11329)
### Motivation and Context
We should warm users of the timeframe at which obsoleted methods will be
deleted.
#11315
### Description
Add a date to the obsolete messages for obsolete methods on the agent
implementations.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Copy file name to clipboardExpand all lines: dotnet/src/Agents/AzureAI/AzureAIAgent.cs
+6-6
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ public AzureAIAgent(
106
106
/// <remarks>
107
107
/// Only supports messages with <see href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-additional_messages">role = User or agent</see>.
108
108
/// </remarks>
109
-
[Obsolete("Pass messages directly to Invoke instead.")]
109
+
[Obsolete("Pass messages directly to Invoke instead. This method will be removed after May 1st 2025.")]
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
120
120
/// <returns>An asynchronous enumeration of messages.</returns>
121
-
[Obsolete("Use the AzureAIAgentThread to retrieve messages instead.")]
121
+
[Obsolete("Use the AzureAIAgentThread to retrieve messages instead. This method will be removed after May 1st 2025.")]
Copy file name to clipboardExpand all lines: dotnet/src/Agents/Bedrock/BedrockAgent.cs
+4-4
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ public async IAsyncEnumerable<AgentResponseItem<ChatMessageContent>> InvokeAsync
215
215
/// <param name="invokeAgentRequest">The request to send to the agent.</param>
216
216
/// <param name="arguments">The arguments to use when invoking the agent.</param>
217
217
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
218
-
[Obsolete("Use InvokeAsync with AgentThread instead.")]
218
+
[Obsolete("Use InvokeAsync with AgentThread instead. This method will be removed after May 1st 2025.")]
/// <param name="agentAliasId">The alias id of the agent to use. The default is the working draft alias id.</param>
282
282
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
283
283
/// <returns>An <see cref="IAsyncEnumerable{T}"/> of <see cref="ChatMessageContent"/>.</returns>
284
-
[Obsolete("Use InvokeAsync with AgentThread instead.")]
284
+
[Obsolete("Use InvokeAsync with AgentThread instead. This method will be removed after May 1st 2025.")]
@@ -456,7 +456,7 @@ public async IAsyncEnumerable<AgentResponseItem<StreamingChatMessageContent>> In
456
456
/// <param name="agentAliasId">The alias id of the agent to use. The default is the working draft alias id.</param>
457
457
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
458
458
/// <returns>An <see cref="IAsyncEnumerable{T}"/> of <see cref="ChatMessageContent"/>.</returns>
459
-
[Obsolete("Use InvokeStreamingAsync with AgentThread instead.")]
459
+
[Obsolete("Use InvokeStreamingAsync with AgentThread instead. This method will be removed after May 1st 2025.")]
@@ -486,7 +486,7 @@ public IAsyncEnumerable<StreamingChatMessageContent> InvokeStreamingAsync(
486
486
/// <param name="arguments">The arguments to use when invoking the agent.</param>
487
487
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
488
488
/// <returns>An <see cref="IAsyncEnumerable{T}"/> of <see cref="StreamingChatMessageContent"/>.</returns>
489
-
[Obsolete("Use InvokeStreamingAsync with AgentThread instead.")]
489
+
[Obsolete("Use InvokeStreamingAsync with AgentThread instead. This method will be removed after May 1st 2025.")]
Copy file name to clipboardExpand all lines: dotnet/src/Agents/OpenAI/OpenAIAssistantAgent.cs
+15-15
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ public OpenAIAssistantAgent(
89
89
/// An assistant removed by other means will result in an exception when invoked.
90
90
/// </remarks>
91
91
[Experimental("SKEXP0110")]
92
-
[Obsolete("Use the OpenAI.Assistants.AssistantClient to manage the Assistant definition lifecycle.")]
92
+
[Obsolete("Use the OpenAI.Assistants.AssistantClient to manage the Assistant definition lifecycle. This method will be removed after May 1st 2025.")]
93
93
publicboolIsDeleted{get;privateset;}
94
94
95
95
/// <summary>
@@ -114,7 +114,7 @@ public OpenAIAssistantAgent(
114
114
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
[Obsolete("Use the OpenAI.Assistants.AssistantClient to create an assistant (CreateAssistantFromTemplateAsync).")]
117
+
[Obsolete("Use the OpenAI.Assistants.AssistantClient to create an assistant (CreateAssistantFromTemplateAsync). This method will be removed after May 1st 2025.")]
#pragma warning disable SKEXP0110// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
120
120
OpenAIClientProviderclientProvider,
@@ -164,7 +164,7 @@ public static async Task<OpenAIAssistantAgent> CreateFromTemplateAsync(
164
164
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
#pragma warning disable SKEXP0110// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
170
170
OpenAIClientProviderclientProvider,
@@ -202,7 +202,7 @@ public static async Task<OpenAIAssistantAgent> CreateAsync(
202
202
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
203
203
/// <returns>A list of <see cref="OpenAIAssistantDefinition"/> objects.</returns>
204
204
[Experimental("SKEXP0110")]
205
-
[Obsolete("Use the OpenAI.Assistants.AssistantClient to query for assistant definitions (GetAssistantsAsync).")]
205
+
[Obsolete("Use the OpenAI.Assistants.AssistantClient to query for assistant definitions (GetAssistantsAsync). This method will be removed after May 1st 2025.")]
#pragma warning disable SKEXP0110// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
208
208
OpenAIClientProviderclientProvider,
@@ -230,7 +230,7 @@ public static async IAsyncEnumerable<OpenAIAssistantDefinition> ListDefinitionsA
230
230
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
[Obsolete("Use the OpenAI.Assistants.AssistantClient to retrieve an assistant definition (GetAssistantsAsync).")]
233
+
[Obsolete("Use the OpenAI.Assistants.AssistantClient to retrieve an assistant definition (GetAssistantsAsync). This method will be removed after May 1st 2025.")]
#pragma warning disable SKEXP0110// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
236
236
OpenAIClientProviderclientProvider,
@@ -274,7 +274,7 @@ public static async Task<OpenAIAssistantAgent> RetrieveAsync(
274
274
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
275
275
/// <returns>The thread identifier.</returns>
276
276
[Experimental("SKEXP0110")]
277
-
[Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one.")]
277
+
[Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.")]
@@ -285,7 +285,7 @@ public Task<string> CreateThreadAsync(CancellationToken cancellationToken = defa
285
285
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
286
286
/// <returns>The thread identifier.</returns>
287
287
[Experimental("SKEXP0110")]
288
-
[Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one.")]
288
+
[Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.")]
@@ -301,7 +301,7 @@ public Task<string> CreateThreadAsync(OpenAIThreadCreationOptions? options, Canc
301
301
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
302
302
/// <returns>The thread identifier.</returns>
303
303
[Experimental("SKEXP0110")]
304
-
[Obsolete("Use the OpenAIAssistantAgentThread to delete an existing thread.")]
304
+
[Obsolete("Use the OpenAIAssistantAgentThread to delete an existing thread. This method will be removed after May 1st 2025.")]
305
305
publicasyncTask<bool>DeleteThreadAsync(
306
306
stringthreadId,
307
307
CancellationTokencancellationToken=default)
@@ -323,7 +323,7 @@ public async Task<bool> DeleteThreadAsync(
323
323
/// <remarks>
324
324
/// This method only supports messages with <see href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-additional_messages">role = User or Assistant</see>.
325
325
/// </remarks>
326
-
[Obsolete("Pass messages directly to Invoke instead.")]
326
+
[Obsolete("Pass messages directly to Invoke instead. This method will be removed after May 1st 2025.")]
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
337
337
/// <returns>An asynchronous enumeration of messages.</returns>
338
-
[Obsolete("Use the OpenAIAssistantAgentThread to retrieve messages instead.")]
338
+
[Obsolete("Use the OpenAIAssistantAgentThread to retrieve messages instead. This method will be removed after May 1st 2025.")]
@@ -350,7 +350,7 @@ public IAsyncEnumerable<ChatMessageContent> GetThreadMessagesAsync(string thread
350
350
/// An assistant-based agent is not usable after deletion.
351
351
/// </remarks>
352
352
[Experimental("SKEXP0110")]
353
-
[Obsolete("Use the OpenAI.Assistants.AssistantClient to remove or otherwise modify the Assistant definition.")]
353
+
[Obsolete("Use the OpenAI.Assistants.AssistantClient to remove or otherwise modify the Assistant definition. This method will be removed after May 1st 2025.")]
0 commit comments