Skip to content
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

.Net: Migrate Azure Chat Completion Service to AzureOpenAI SDK v2 #6984

Conversation

SergeyMenshykh
Copy link
Member

@SergeyMenshykh SergeyMenshykh commented Jun 27, 2024

Motivation and Context

This PR is the next step in a series of follow-up PRs to migrate AzureOpenAIConnector to Azure AI SDK v2. It updates all code related to AzureOpenAI ChatCompletionService to use the Azure AI SDK v2. One of the goals of the PR is to update the code with a minimal number of changes to make the code review as easy as possible, so almost all methods keep their names as they were even though they might not be relevant anymore. This will be fixed in one of the follow-up PRs.

Description

This PR does the following:

  1. Migrates AzureOpenAIChatCompletionService, ClientCore, and other model classes both use, to Azure AI SDK v2.
  2. Updates ToolCallBehavior classes to return a list of functions and function choice. This change is required because the new SDK model requires both of those for the CompletionsOptions class creation and does not allow setting them after the class is already created, as it used to allow.
  3. Adapts related unit tests to the API changes.

Next steps

  1. Add integration tests.
  2. Rename internal/private methods that were intentionally left with old, irrelevant names to minimize the code review delta.

Out of scope:

Contribution Checklist

@SergeyMenshykh SergeyMenshykh requested a review from a team as a code owner June 27, 2024 10:23
@SergeyMenshykh SergeyMenshykh self-assigned this Jun 27, 2024
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Jun 27, 2024
@RogerBarreto RogerBarreto merged commit f8a22b8 into microsoft:feature-connectors-openai Jun 27, 2024
10 checks passed
Copy link
Member

@RogerBarreto RogerBarreto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants