-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Graduate Agent Abstractions #10637
Comments
.NET API Being Graduated: Class:
|
.NET OpenAIAssistantAgent Migration GuideWe recently applied a significant shift around the These changes were applied in: These changes are intended to:
Migration TacticsAll deprecated patterns are maked with the As always, our samples illustrate usage of the Agent Framework: The following migration tactics are included to clarity how to move forward with the new patterns. Backwards Compatibility / "Do Nothing"By retaining the deprecated patterns, backwards compatibility has been maintained. To proceed without any migration, you may suppress warning ( <PropertyGroup>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup> Client InstantiationPreviously, an This has been changed to only require an Static methods exist on
Example: OpenAIClient client = OpenAIAssistantAgent.CreateAzureOpenAIClient(new AzureCliCredential(), new Uri(endpointUrl));
AssistantClient assistantClient = client.GetAssistantClient(); Assistant LifecycleConstructorYou may now invoke the public constructor of Assistant definition = await assistantClient.GetAssistantAsync(assistantId);
OpenAIAssistantAgent agent = new(definition, client); Additionally, plugins may be provided streamlining the agent initialization process: KernelPlugin plugin = KernelPluginFactory.CreateFromType<YourPlugin>()
Assistant definition = await assistantClient.GetAssistantAsync(assistantId);
OpenAIAssistantAgent agent = new(definition, client, [plugin]); To create a new assistant definition, we've provided a convenient extension method that streamlines common configuations such as enabling the code-interpeter: Assistant assistant =
await assistantClient.CreateAssistantAsync(
this.Model,
name,
instructions: instructions,
enableCodeInterpreter: true); InvocationWhen invoking an agent, you may optionally specify Deletionawait assistantClient.DeleteAssistantAsync(agent.Id); Thread LifecycleThread creation and deletion may be directly managed using the CreationThe AssistantThread thread = await assistantClient.CreateThreadAsync(); Extension MethodWe provide a convenient extension method that can handle translation of string threadId = await assistantClient.CreateThreadAsync(messages: [new ChatMessageContent(AuthorRole.User, "<message content>")]); DeletionLikewise, the await assistantClient.DeleteThreadAsync(thread.Id); File LifecycleFile creation and deletion may be directly managed using the We've also added a convenient extension method to streamline this operation using the Uploadstring fileId = await client.UploadAssistantFileAsync(stream, "<filename>"); Deletionawait client.DeleteFileAsync(fileId); VectorStore LifecycleLifecycle management of a Vector Store has always required using the Creationstring vectorStoreId = await client.CreateVectorStoreAsync([fileId1, fileId2], waitUntilCompleted: true); Deletionawait client.DeleteVectorStoreAsync(vectorStoreId); |
Agent Framework Feature Graduation
Plan for the graduation of certain components in the Agent Framework
Checklist to be completed when graduating an experimental feature
Notify PM's and EM's that feature is ready for graduation
Contact PM for list of sample use cases
Verify there are sample implementations for each of the use cases
Verify telemetry and logging are complete
Verify API docs are complete and arrange to have them published
Make appropriate updates to Learn docs
Update Agent Framework Learn Site Docs with New Agent Types #10541
Make appropriate updates to Concept samples
Make appropriate updates to Blog posts
Verify there are no serious open Issues
Update table in EXPERIMENTS.md
Remove SKEXP flag from the experimental code
.Net Agents: Update experimental meta-data for graduation #10600
The text was updated successfully, but these errors were encountered: