Skip to content

Commit b54c588

Browse files
committed
Update to .NET 10
1 parent 5fe6383 commit b54c588

File tree

11 files changed

+30
-24
lines changed

11 files changed

+30
-24
lines changed

.github/workflows/azure-dev-build-only.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup .NET SDK
3232
uses: actions/setup-dotnet@v4
3333
with:
34-
dotnet-version: 9.x
34+
dotnet-version: 10.x
3535

3636
- name: Setup Ollama
3737
uses: ai-action/setup-ollama@v1

.github/workflows/azure-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Setup .NET SDK
4242
uses: actions/setup-dotnet@v4
4343
with:
44-
dotnet-version: 9.x
44+
dotnet-version: 10.x
4545

4646
- name: Setup Ollama
4747
uses: ai-action/setup-ollama@v1

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
3+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
44

55
COPY ./src/OpenChat.PlaygroundApp /source/OpenChat.PlaygroundApp
66

@@ -14,7 +14,7 @@ RUN case "$TARGETARCH" in \
1414
esac && \
1515
dotnet publish -c Release -o /app -r $RID --self-contained false
1616

17-
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
17+
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
1818

1919
WORKDIR /app
2020

Dockerfile.azure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
3+
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
44

55
COPY ./src/OpenChat.PlaygroundApp /source/OpenChat.PlaygroundApp
66

77
WORKDIR /source/OpenChat.PlaygroundApp
88

99
RUN dotnet publish -c Release -o /app
1010

11-
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
11+
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
1212

1313
WORKDIR /app
1414

global.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"sdk": {
3+
"version": "10.0.100",
4+
"rollForward": "latestFeature",
35
"allowPrerelease": false
46
}
57
}

src/OpenChat.ConsoleApp/OpenChat.ConsoleApp.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88

@@ -11,9 +11,8 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.*" />
15-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.*" />
16-
<PackageReference Include="System.Net.Http.Json" Version="9.*" />
14+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.*" />
15+
<PackageReference Include="Microsoft.Extensions.Http" Version="10.*" />
1716
</ItemGroup>
1817

1918
<ItemGroup>

src/OpenChat.PlaygroundApp/Endpoints/ChatResponseEndpoint.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ public void MapEndpoint(IEndpointRouteBuilder app)
2929
.Accepts<IEnumerable<ChatRequest>>(contentType: "application/json")
3030
.Produces<List<ChatResponse>>(statusCode: StatusCodes.Status200OK, contentType: "application/json")
3131
.WithName("PostChatResponses")
32-
.WithOpenApi();
32+
.AddOpenApiOperationTransformer((operation, context, token) =>
33+
{
34+
operation.Summary = "Get streaming chat responses based on the provided chat requests.";
35+
operation.Description = "This endpoint accepts a list of chat requests and returns streaming chat responses.";
36+
return Task.CompletedTask;
37+
});
3338
}
3439

3540
private async IAsyncEnumerable<ChatResponse> PostChatResponseAsync(

src/OpenChat.PlaygroundApp/OpenApi/OpenApiDocumentTransformer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Microsoft.AspNetCore.OpenApi;
2-
using Microsoft.OpenApi.Models;
2+
using Microsoft.OpenApi;
33

44
namespace OpenChat.PlaygroundApp.OpenApi;
55

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66

77
<ImplicitUsings>enable</ImplicitUsings>
@@ -15,15 +15,15 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="Anthropic.SDK" Version="5.*" />
18-
<PackageReference Include="AWSSDK.Extensions.Bedrock.MEAI" Version="4.*-*" />
18+
<PackageReference Include="AWSSDK.Extensions.Bedrock.MEAI" Version="4.*" />
1919
<PackageReference Include="Azure.AI.OpenAI" Version="2.*-*" />
2020
<PackageReference Include="Microsoft.AI.Foundry.Local" Version="0.*" />
21-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.*" />
22-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.*-*" />
23-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.*-*" />
21+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.*" />
22+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.*-*" />
23+
<PackageReference Include="Microsoft.Extensions.AI" Version="10.*-*" />
2424
<PackageReference Include="Mscc.GenerativeAI.Microsoft" Version="2.*" />
2525
<PackageReference Include="OllamaSharp" Version="5.*" />
26-
<PackageReference Include="System.Linq.Async" Version="6.*" />
26+
<PackageReference Include="System.Linq.Async" Version="7.*-*" />
2727
</ItemGroup>
2828

2929
</Project>

test/OpenChat.ConsoleApp.Tests/OpenChat.ConsoleApp.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="coverlet.collector" Version="6.*" />
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
1313
<PackageReference Include="NSubstitute" Version="5.*" />
1414
<PackageReference Include="Shouldly" Version="4.*" />
1515
<PackageReference Include="xunit" Version="2.*" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.*" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

0 commit comments

Comments
 (0)