Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-publish-inferpage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore src/MaIN.InferPage
Expand All @@ -24,7 +24,7 @@ jobs:
run: dotnet build src/MaIN.InferPage --configuration Release --no-restore

- name: Publish project
run: dotnet publish src/MaIN.InferPage --configuration Release --output ./publish --no-build
run: dotnet publish src/MaIN.InferPage --framework net10.0 --configuration Release --output ./publish --no-build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # Change to your project’s .NET version
dotnet-version: '10.0.x' # Change to your project’s .NET version

- name: Restore dependencies
run: dotnet restore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
Expand Down
1 change: 1 addition & 0 deletions Examples/Examples/Chat/ChatWithTextToSpeechExample.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using MaIN.Core.Hub;
using MaIN.Domain.Entities;
using MaIN.Services.Services.TTSService;
#pragma warning disable CS0618 // Type or member is obsolete

namespace Examples.Chat;

Expand Down
2 changes: 1 addition & 1 deletion Examples/Examples/Examples.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>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
8 changes: 2 additions & 6 deletions MaIN.Core.IntegrationTests/ChatTests.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System.Text.Json;
using MaIN.Core.Hub;
using MaIN.Domain.Configuration;
using MaIN.Core.Hub;
using MaIN.Domain.Entities;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.Extensions.Configuration;

namespace MaIN.Core.IntegrationTests;

public class ChatTests : IntegrationTestBase
{
public ChatTests(WebApplicationFactory<Program> factory) : base(factory)
public ChatTests() : base()
{
}

Expand Down
56 changes: 40 additions & 16 deletions MaIN.Core.IntegrationTests/IntegrationTestBase.cs
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
using System.Net.Sockets;
using MaIN.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace MaIN.Core.IntegrationTests;

public class IntegrationTestBase : IClassFixture<WebApplicationFactory<Program>>
public class IntegrationTestBase : IDisposable
{
protected readonly WebApplicationFactory<Program> _factory;
protected readonly HttpClient _client;
protected readonly IHost _host;
protected readonly IServiceProvider _services;

public IntegrationTestBase(WebApplicationFactory<Program> factory)
public IntegrationTestBase()
{
_factory = factory.WithWebHostBuilder(builder =>
{
builder.ConfigureServices((context, services) =>
_host = CreateHost();
_host.Start();

_services = _host.Services;
}

private IHost CreateHost()
{
var hostBuilder = Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>
{
services.AddMaIN(context.Configuration);

var provider = services.BuildServiceProvider();
provider.UseMaIN();
webBuilder
.UseUrls("http://localhost:0") // Random available port
.ConfigureServices((context, services) =>
{
services.AddMaIN(context.Configuration);

var provider = services.BuildServiceProvider();
provider.UseMaIN();
});
});
});

_client = _factory.CreateClient();

return hostBuilder.Build();
}


protected T GetService<T>() where T : notnull
{
return _services.GetRequiredService<T>();
}

protected static bool PingHost(string host, int port, int timeout)
{
try
Expand All @@ -50,4 +69,9 @@ protected static bool PingHost(string host, int port, int timeout)
return false;
}
}

public void Dispose()
{
_host?.Dispose();
}
}
14 changes: 8 additions & 6 deletions MaIN.Core.IntegrationTests/MaIN.Core.IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.14" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.22" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.5.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3"/>
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand All @@ -21,7 +24,6 @@

<ItemGroup>
<ProjectReference Include="..\src\MaIN.Core\MaIN.Core.csproj" />
<ProjectReference Include="..\src\MaIN\MaIN.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 0 additions & 12 deletions MaIN.sln
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN", "src\MaIN\MaIN.csproj", "{7E8DD6E0-F9A8-4BD0-8733-49F0F2F4FCA0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Main.Infrastructure", "src\MaIN.Infrastructure\MaIN.Infrastructure.csproj", "{84C09EF9-B9E3-4ACB-9BC3-DEFFC29D528F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN.Services", "src\MaIN.Services\MaIN.Services.csproj", "{35DBE637-EC89-40A7-B5F9-D005D554E8ED}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN.Domain", "src\MaIN.Domain\MaIN.Domain.csproj", "{4DEF4AA6-DFD8-4626-B8BE-2F773B12FE0C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN.RAG.Demo", "src\MaIN.RAG.Demo\MaIN.RAG.Demo.csproj", "{2351B015-EA33-42F3-A844-CECABF140E9A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN.Core", "src\MaIN.Core\MaIN.Core.csproj", "{E3CFD135-0339-4539-A5FB-96CBE92A8EA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{28851935-517F-438D-BF7C-02FEB1A37A68}"
Expand All @@ -32,10 +28,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7E8DD6E0-F9A8-4BD0-8733-49F0F2F4FCA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E8DD6E0-F9A8-4BD0-8733-49F0F2F4FCA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E8DD6E0-F9A8-4BD0-8733-49F0F2F4FCA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E8DD6E0-F9A8-4BD0-8733-49F0F2F4FCA0}.Release|Any CPU.Build.0 = Release|Any CPU
{84C09EF9-B9E3-4ACB-9BC3-DEFFC29D528F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84C09EF9-B9E3-4ACB-9BC3-DEFFC29D528F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84C09EF9-B9E3-4ACB-9BC3-DEFFC29D528F}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -48,10 +40,6 @@ Global
{4DEF4AA6-DFD8-4626-B8BE-2F773B12FE0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DEF4AA6-DFD8-4626-B8BE-2F773B12FE0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DEF4AA6-DFD8-4626-B8BE-2F773B12FE0C}.Release|Any CPU.Build.0 = Release|Any CPU
{2351B015-EA33-42F3-A844-CECABF140E9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2351B015-EA33-42F3-A844-CECABF140E9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2351B015-EA33-42F3-A844-CECABF140E9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2351B015-EA33-42F3-A844-CECABF140E9A}.Release|Any CPU.Build.0 = Release|Any CPU
{E3CFD135-0339-4539-A5FB-96CBE92A8EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3CFD135-0339-4539-A5FB-96CBE92A8EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3CFD135-0339-4539-A5FB-96CBE92A8EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
3 changes: 3 additions & 0 deletions Releases/0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 0.8.0 release

- Update libraries to .NET 10
16 changes: 11 additions & 5 deletions src/MaIN.Core.UnitTests/MaIN.Core.UnitTests.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>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -10,11 +10,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.5.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3"/>
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 5 additions & 6 deletions src/MaIN.Core/.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>MaIN.NET</id>
<version>0.7.10</version>
<version>0.8.0</version>
<authors>Wisedev</authors>
<owners>Wisedev</owners>
<icon>favicon.png</icon>
Expand All @@ -11,17 +11,16 @@
<projectUrl>https://github.com/wisedev-code/MaIN.NET</projectUrl>
<repository url="https://github.com/wisedev-code/MaIN.NET" type="git" />
<dependencies>
<dependency id="GTranslate" version="2.2.0" />
<dependency id="HtmlAgilityPack" version="1.12.1" />
<dependency id="GTranslate" version="2.3.1" />
<dependency id="HtmlAgilityPack" version="1.12.4" />
<dependency id="LLamaSharp" version="0.25.0" />
<dependency id="LLamaSharp.Backend.Cuda12" version="0.25.0" />
<dependency id="LLamaSharp.kernel-memory" version="0.25.0" />
<dependency id="ModelContextProtocol.AspNetCore" version="0.2.0-preview.1" />
<dependency id="Microsoft.SemanticKernel" version="1.49.0" />
<dependency id="Microsoft.SemanticKernel" version="1.68.0" />
<dependency id="Microsoft.SemanticKernel.Connectors.Google" version="1.64.0-alpha" />
<dependency id="Microsoft.Extensions.Http" version="9.0.3" />
<dependency id="Microsoft.Extensions.Http" version="10.0.1" />
<dependency id="Microsoft.KernelMemory" version="0.98.250508.3" />
<dependency id="System.Data.SqlClient" version="4.8.6" />
<dependency id="Tesseract" version="5.2.0" />
<dependency id="Tesseract.Data.English" version="4.0.0" />
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions src/MaIN.Core/MaIN.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NuspecFile>.nuspec</NuspecFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GTranslate" Version="2.2.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.12.1" />
<PackageReference Include="GTranslate" Version="2.3.1" />
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
<PackageReference Include="LLamaSharp" Version="0.25.0" />
<PackageReference Include="LLamaSharp.Backend.Cuda12" Version="0.25.0" />
<PackageReference Include="LLamaSharp.kernel-memory" Version="0.25.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.1" />
<PackageReference Include="Microsoft.KernelMemory" Version="0.98.250508.3" />
<PackageReference Include="Microsoft.KernelMemory.SemanticKernelPlugin" Version="0.98.250508.3" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
Expand Down
2 changes: 1 addition & 1 deletion src/MaIN.Domain/Entities/Tools/ToolInvocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class ToolInvocation
{
public string ToolName { get; set; }
public required string ToolName { get; set; }
public string Arguments { get; set; } = null!;
public bool Done { get; set; } = false;
}
2 changes: 1 addition & 1 deletion src/MaIN.Domain/MaIN.Domain.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>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
8 changes: 4 additions & 4 deletions src/MaIN.InferPage/MaIN.InferPage.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand All @@ -11,9 +11,9 @@
<PackageReference Include="Costura.Fody" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Markdig" Version="0.40.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.11.6"/>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.11.6"/>
<PackageReference Include="Markdig" Version="0.44.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.13.2" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.13.2" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/MaIN.Infrastructure/MaIN.Infrastructure.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>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
Expand All @@ -11,10 +11,10 @@
<PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0-preview.5.24306.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.8" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.0-preview.5.24306.7" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.1" />
<PackageReference Include="MongoDB.Driver" Version="3.2.1" />
<PackageReference Include="MongoDB.Driver.Core" Version="2.30.0" />
</ItemGroup>
Expand Down
20 changes: 0 additions & 20 deletions src/MaIN.RAG.Demo/MaIN.RAG.Demo.csproj

This file was deleted.

Loading
Loading