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:
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Luna.Providers.Mistral.DTOs;
|
||||
|
||||
public class MistralChatCompletionChunk
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("object")]
|
||||
public string? Object { get; set; }
|
||||
|
||||
[JsonPropertyName("model")]
|
||||
public string? Model { get; set; }
|
||||
|
||||
[JsonPropertyName("choices")]
|
||||
public List<MistralChoiceChunk>? Choices { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user