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.
18 lines
427 B
C#
18 lines
427 B
C#
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; }
|
|
} |