Skip to content

Commit

Permalink
feat: Updated to net9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Nov 13, 2024
1 parent 6aacc09 commit 363e1d5
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }}
if: ${{ github.event.pull_request.draft == false && (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }}
steps:
- name: Dependabot metadata
if: ${{ github.actor == 'dependabot[bot]' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
git checkout -b ${{ steps.branch.outputs.branch_name }} origin/main
git rebase main
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Generate code
run: |
cd src/libs/Anthropic
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Generate docs
run: dotnet run --project src/helpers/GenerateDocs/GenerateDocs.csproj .

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
test:
name: Test
if: github.event.pull_request.draft == false
uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main
with:
generate-build-number: false
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/GenerateDocs/GenerateDocs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/TrimmingHelper/TrimmingHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>

<PublishTrimmed>true</PublishTrimmed>
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Anthropic/Anthropic.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net4.6.2;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net4.6.2;net8.0;net9.0</TargetFrameworks>
<NoWarn>$(NoWarn);CA1307;CA1724;CA1822</NoWarn>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
Expand All @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpToJsonSchema" Version="3.9.1" />
<PackageReference Include="CSharpToJsonSchema" Version="3.10.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.0-preview.9.24556.5" />
<PackageReference Include="PolySharp" Version="1.14.1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class CreateMessageRequest
/// </summary>
/// <example>claude-3-5-sonnet-20241022</example>
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.AnyOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.AnyOfJsonConverter<string, global::Anthropic.CreateMessageRequestModel?>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::Anthropic.AnyOf<string, global::Anthropic.CreateMessageRequestModel?> Model { get; set; }

Expand Down Expand Up @@ -134,7 +134,7 @@ public sealed partial class CreateMessageRequest
/// [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("system")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>))]
public global::Anthropic.OneOf<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>? System { get; set; }

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Anthropic/Generated/Anthropic.Models.Message.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed partial class Message
/// The content of the message.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::Anthropic.OneOf<string, global::System.Collections.Generic.IList<global::Anthropic.Block>> Content { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class ToolResultBlock
/// These content blocks can use the text or image types.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Anthropic.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::Anthropic.OneOf<string, global::System.Collections.Generic.IList<global::Anthropic.Block>> Content { get; set; }

Expand Down
25 changes: 0 additions & 25 deletions src/libs/Anthropic/Generated/JsonConverters.AnyOfFactory2.g.cs

This file was deleted.

25 changes: 0 additions & 25 deletions src/libs/Anthropic/Generated/JsonConverters.OneOfFactory2.g.cs

This file was deleted.

6 changes: 4 additions & 2 deletions src/libs/Anthropic/Generated/JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ namespace Anthropic
typeof(global::Anthropic.JsonConverters.BlockDeltaDiscriminatorTypeNullableJsonConverter),
typeof(global::Anthropic.JsonConverters.MessageStreamEventDiscriminatorTypeJsonConverter),
typeof(global::Anthropic.JsonConverters.MessageStreamEventDiscriminatorTypeNullableJsonConverter),
typeof(global::Anthropic.JsonConverters.AnyOfJsonConverterFactory2),
typeof(global::Anthropic.JsonConverters.OneOfJsonConverterFactory2),
typeof(global::Anthropic.JsonConverters.BlockJsonConverter),
typeof(global::Anthropic.JsonConverters.ToolJsonConverter),
typeof(global::Anthropic.JsonConverters.MessageStreamEventJsonConverter),
typeof(global::Anthropic.JsonConverters.BlockDeltaJsonConverter),
typeof(global::Anthropic.JsonConverters.AnyOfJsonConverter<string, global::Anthropic.CreateMessageRequestModel?>),
typeof(global::Anthropic.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>),
typeof(global::Anthropic.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>),
typeof(global::Anthropic.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>),
})]

[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Anthropic.JsonSerializerContextTypes))]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup Label="Base packages">
<PackageReference Include="MSTest" Version="3.6.2" />
<PackageReference Include="MSTest" Version="3.6.3" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 363e1d5

Please sign in to comment.