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.
21 lines
496 B
C#
21 lines
496 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Luna.Providers.Mistral.DTOs;
|
|
|
|
public class MistralChatCompletionResponse
|
|
{
|
|
[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<MistralChoice>? Choices { get; set; }
|
|
|
|
[JsonPropertyName("usage")]
|
|
public Usage? Usage { get; set; }
|
|
} |