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
347 B
C#
15 lines
347 B
C#
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; }
|
|
} |