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
3 changes: 0 additions & 3 deletions Examples/Examples/Chat/ChatWithImageGenExample.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Examples.Utils;
using MaIN.Core.Hub;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;

namespace Examples;

Expand Down
3 changes: 0 additions & 3 deletions Examples/Examples/Chat/ChatWithImageGenOpenAiExample.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Examples.Utils;
using MaIN.Core.Hub;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;

namespace Examples;

Expand Down
5 changes: 0 additions & 5 deletions Examples/Examples/Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,4 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />
</ItemGroup>

</Project>
7 changes: 1 addition & 6 deletions Examples/Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Examples.Agents;
using Examples.Agents.Flows;
using MaIN.Core;
using MaIN.Domain.Configuration;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

Expand All @@ -29,11 +28,7 @@

var services = new ServiceCollection();
services.AddSingleton<IConfiguration>(configuration);
services.AddMaIN(configuration, (options) =>
{
options.BackendType = BackendType.OpenAi;
options.OpenAiKey = "<YOUR_OPENAI_KEY>";
});
services.AddMaIN(configuration);

RegisterExamples(services);

Expand Down
65 changes: 0 additions & 65 deletions Examples/Examples/Utils/ConsoleRenderer.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Examples/Examples/Utils/ImagePreviewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Examples.Utils;

public static class ImagePreview
{
public static void ShowImage(byte[] imageData, string extension = "png")
public static void ShowImage(byte[]? imageData, string extension = "png")
{
// Validate extension
if (string.IsNullOrWhiteSpace(extension) || extension.Contains("."))
Expand All @@ -21,7 +21,7 @@ public static void ShowImage(byte[] imageData, string extension = "png")
$"{Guid.NewGuid()}.{extension}"
);

File.WriteAllBytes(tempFile, imageData);
File.WriteAllBytes(tempFile, imageData!);

try
{
Expand Down
7 changes: 4 additions & 3 deletions MaIN.Server/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using MaIN.Domain.Entities;
using MaIN.Services;
using MaIN.Services.Services.Abstract;
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Models;

Expand Down Expand Up @@ -45,7 +46,7 @@
return Results.Ok(models);
});

app.MapDelete("/api/llm/session/{chatId}", async ([FromServices] ILLMService llmService, string chatId) =>
app.MapDelete("/api/llm/session/{chatId}", async ([FromServices] ILLMService llmService, string? chatId) =>
{
await llmService.CleanSessionCache(chatId);
return Results.Ok($"Session chat {chatId} has been cleared.");
Expand All @@ -66,6 +67,6 @@
app.Run();

// Request DTOs
record ChatRequest(Chat? Chat, bool InteractiveUpdates = false, bool NewSession = false);
record ChatRequest(Chat Chat, bool InteractiveUpdates = false, bool NewSession = false);

record AskMemoryRequest(Chat? Chat, Dictionary<string,string>? TextData = null, Dictionary<string,string>? FileData = null, List<string>? Memory = null);
record AskMemoryRequest(Chat Chat, Dictionary<string,string>? TextData = null, Dictionary<string,string>? FileData = null, List<string>? Memory = null);
6 changes: 6 additions & 0 deletions MaIN.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN.Core.UnitTests", "src\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples.SimpleConsole", "Examples\Examples.SimpleConsole\Examples.SimpleConsole.csproj", "{75DEBB8A-75CD-44BA-9369-3916950428EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaIN.InferPage", "src\MaIN.InferPage\MaIN.InferPage.csproj", "{B691188A-1170-489D-8729-A13108C12C57}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -70,6 +72,10 @@ Global
{75DEBB8A-75CD-44BA-9369-3916950428EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75DEBB8A-75CD-44BA-9369-3916950428EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75DEBB8A-75CD-44BA-9369-3916950428EF}.Release|Any CPU.Build.0 = Release|Any CPU
{B691188A-1170-489D-8729-A13108C12C57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B691188A-1170-489D-8729-A13108C12C57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B691188A-1170-489D-8729-A13108C12C57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B691188A-1170-489D-8729-A13108C12C57}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{781BDD20-65BA-4C5D-815B-D8A15931570A} = {28851935-517F-438D-BF7C-02FEB1A37A68}
Expand Down
16 changes: 16 additions & 0 deletions Releases/0.0.8-pre.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 0.0.8 pre-release

- Project cleanup
- New version of CLI (introduced infer and config commands)
- name of model **breaking change**

In order to align with new breaking change, align your already downloaded models to this names (and ofc .gguf extension)
-- DeepSeekR1-8b
-- Fox-1.6b
-- gemma2-2b
-- Llama3.1-8b
-- Llama3.2-3b
-- Llava
-- Nomic
-- phi3.5
-- Qwen2.5
Loading