-
Notifications
You must be signed in to change notification settings - Fork 4.1k
.Net: Add thread retrieval interface to enforce thread retrieval requirement for stateless agents. #11289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
.Net: Add thread retrieval interface to enforce thread retrieval requirement for stateless agents. #11289
Conversation
…t for stateless agents.
/// </para> | ||
/// </remarks> | ||
[Experimental("SKEXP0110")] | ||
public interface IAgentThreadRetrievable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps IAgentContextProvider
@@ -266,20 +266,22 @@ public abstract IAsyncEnumerable<AgentResponseItem<StreamingChatMessageContent>> | |||
|
|||
private ILogger? _logger; | |||
|
|||
#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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically if our existing non-experimental API's have dependency on experimental behavior those should be experimental as well, unless we have a dedicated PR that uses the new experimental behavior marked as Experimental as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior here isn't experimental as such, it's really only the thread interface. E.g. the ChatHistoryAgentThread already supports retrieving messages without the new interface. However, where folks are building their own threads, and use the new interface, that's where it should show up as experimental, because using that interface on their own thread as well as all usage of that thread is then experimental.
Parking this until after GA |
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> | ||
/// <returns>The messages in the thread.</returns> | ||
/// <exception cref="InvalidOperationException">The thread has been deleted.</exception> | ||
[Experimental("SKEXP0110")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Experimental at the interface level should be sufficient
Motivation and Context
We need to have a standard way to retrieve chat history from a thread for agents that require
chat history at invocation time. This also allows these agents to check that the thread is
compatible before processing.
Description
Contribution Checklist