-
Notifications
You must be signed in to change notification settings - Fork 476
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
Upgrade to .NET 9.0 and update Azure SDK, SK and other packages #394
base: main
Are you sure you want to change the base?
Conversation
DETAILS - Upgraded project from .NET 8.0 to .NET 9.0 across multiple files, including `Directory.Packages.props`, `SharedWebComponents.csproj`, `MinimalApi.csproj`, `ClientApp.csproj`, and various test projects. - Updated several Azure-related packages to newer versions, such as `Azure.AI.OpenAI`, `Azure.Extensions.AspNetCore.Configuration.Secrets`, and `Azure.Identity`. - Modified the Dockerfile to use .NET 9.0 base images for both runtime and build stages. - Replaced `OpenAIClient` with `AzureOpenAIClient` for improved functionality with Azure OpenAI services. - Updated methods for generating embeddings and chat completions to align with new client methods. - Adjusted test files to ensure compatibility with the updated framework and client. - Added XML configuration for SDK resolver settings to manage SDK versions and paths.
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.
Thanks @elbruno. LGTM. Just one minor comment.
var embedding = embeddings.Value.Data.FirstOrDefault()?.Embedding.ToArray() ?? []; | ||
var embeddingsClient = openAIClient.GetEmbeddingClient(embeddingModelName); | ||
var embeddings = await embeddingsClient.GenerateEmbeddingAsync(input: section.Content.Replace('\r', ' ')); | ||
var embedding = embeddings.Value.ToFloats(); // .Value.Data.FirstOrDefault()?.Embedding.ToArray() ?? []; |
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.
Is the comment at the end of this needed?
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.
Oh, that was part of the package upgrade tests, deleted the unused comment.
Also, I think you might need to update GHA to use .NET 9 as well. I think that's why the build is failing. |
Yes, let me upgrade the actions files to use .NET 9 |
@@ -16,7 +16,7 @@ jobs: | |||
- name: Setup .NET | |||
uses: actions/setup-dotnet@v3 | |||
with: | |||
dotnet-version: 8.0.x | |||
dotnet-version: 9.0.x |
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.
@luisquintanilla upgraded GHAction to build NET 9 projects
Build success https://github.com/Azure-Samples/azure-search-openai-demo-csharp/actions/runs/13531943341/job/37815971710
Purpose
Directory.Packages.props
,SharedWebComponents.csproj
,MinimalApi.csproj
,ClientApp.csproj
, and various test projects.Azure.AI.OpenAI
,Azure.Extensions.AspNetCore.Configuration.Secrets
, andAzure.Identity
.OpenAIClient
withAzureOpenAIClient
for improved functionality with Azure OpenAI services.Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?