-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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: Rename AzureChatCompletion to AzureOpenAIChatCompletion (and other types) #3155
Comments
The existing Azure Chat/Text completion connectors should make it clear that they're only for OpenAI models. |
Looking at this again, why do the AzureOpenAIXx types/methods even need to exist? Isn't everything identical between the AzureOpenAIXx and OpenAIXx types, including implementation down to the OpenAIClient being used. and the only difference is whether an endpoint is supplied to the ctor? |
@stephentoub Even taking into account that for both But I 100% agree that |
👍
That exists in Azure OpenAI as well. |
I don't feel super strongly about consolidating them. But having two completely separate type hierarchices, sets of extension methods, etc., is just extra work for anyone trying to be portable across OpenAI and Azure OpenAI, which is unfortunate given that at the end of the day they end up using the exact same OpenAIClient under the covers, share all of the same code to get there, etc. It seems like unnecessary friction. If we really believe there's going to be divergence in the future that would make consolidation problematic, ok... but I'd be curious what we think that'll be given that OpenAIClient is servicing both. |
Ideally, I would use separate SDKs as these are separate services. But taking into account that we use only one, maybe it makes sense to have one type to handle both services. On Python side, semantic-kernel/python/semantic_kernel/connectors/ai/open_ai/services/azure_chat_completion.py Lines 12 to 15 in f10d90f
In case we will have just one type to work with Azure OpenAI and OpenAI, we will have to differentiate both services somehow inside that type, for example for logging. It's important to see in logs which service responds and how. |
We can find a middle ground here: keep the SK public API (WithAzureChatCompletionService, WithOpenAIChatCompletionService) as it is today but consolidate the connectors into one. Later, we can always add another connector in case of divergence without impacting SK consumer code. |
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Resolves: #3155 This PR contains changes to rename `Azure*` classes and methods to `AzureOpenAI*` to make it clear that they work with OpenAI models. Note: `AzureTextCompletion` class and related extension methods remain the same, as they are marked as obsolete in this PR: #3396 ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] 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 - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone - this is breaking change, as some public classes and methods were renamed. Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Resolves: microsoft#3155 This PR contains changes to rename `Azure*` classes and methods to `AzureOpenAI*` to make it clear that they work with OpenAI models. Note: `AzureTextCompletion` class and related extension methods remain the same, as they are marked as obsolete in this PR: microsoft#3396 ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] 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 - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone - this is breaking change, as some public classes and methods were renamed. Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
Important
Labeled Urgent because it may require a breaking change.
We have OpenAIChatCompletion and AzureChatCompletion, and OpenAIRequestSettings which appears to be what should be used with both. Should AzureChatCompletion (and related types) be renamed to have AzureOpenAI instead of Azure as the prefix? Will AzureChatCompletion work with everything "Azure" in the future and not just the "AzureOpenAI" service? Will someone seeing they need to pass an AIRequestSettings to work with AzureChatCompletion know that it's the OpenAIRequestSettings they need to use even though there's no Azure in the name?
The text was updated successfully, but these errors were encountered: