-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C#] bump: Migrate to OpenAI's official .NET SDK (#1858)
## Linked issues closes: #1821 (issue number) ## Details * Migrated from `Azure.AI.OpenAI` to openai's official .NET sdk `OpenAI`. #### Change details * **[BREAKING**] Removed `/completions` completions endpoint support for both OpenAI & AzureOpenAI. It was deprecated by OpenAI June 2023 and virtually no one uses it. * [x] Updated all the samples to migrate to `/chat` endpoint. * Updated default AzureOpenAI api version to `2024-06-01`. * The earliest supported api version is now `2024-04-01-preview`. This is a consequence of using the openai's dotnet sdk `OpenAI`. * Migrated `OpenAIModel` & `OpenAIEmbeddings` class' underlying clients. ## Attestation Checklist - [x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes ### Additional information > Feel free to add other relevant information below
- Loading branch information
Showing
42 changed files
with
913 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.