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.
15 lines
346 B
C#
15 lines
346 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Luna.Providers.Mistral.DTOs;
|
|
|
|
public class MistralChoiceChunk
|
|
{
|
|
[JsonPropertyName("index")]
|
|
public int Index { get; set; }
|
|
|
|
[JsonPropertyName("delta")]
|
|
public MistralDelta? Delta { get; set; }
|
|
|
|
[JsonPropertyName("finish_reason")]
|
|
public string? FinishReason { get; set; }
|
|
} |