Add provider abstraction layer with Mistral and Ollama implementations

Define IProvider interface and implement concrete providers for Mistral
(with custom DTOs for chat completion API) and Ollama (via OllamaSharp).
Includes DI registration extensions using Microsoft.Extensions.AI.
This commit is contained in:
2026-04-04 04:10:39 +02:00
parent 63818df4b5
commit 45d3ee1ed6
18 changed files with 515 additions and 0 deletions
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Luna.Providers.Mistral.DTOs;
public class MistralChoice
{
[JsonPropertyName("index")]
public int Index { get; set; }
[JsonPropertyName("message")]
public MistralMessage? Message { get; set; }
[JsonPropertyName("finish_reason")]
public string? FinishReason { get; set; }
}