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
355 B
C#
15 lines
355 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Luna.Providers.Mistral.DTOs;
|
|
|
|
public class Usage
|
|
{
|
|
[JsonPropertyName("prompt_tokens")]
|
|
public int PromptTokens { get; set; }
|
|
|
|
[JsonPropertyName("completion_tokens")]
|
|
public int CompletionTokens { get; set; }
|
|
|
|
[JsonPropertyName("total_tokens")]
|
|
public int TotalTokens { get; set; }
|
|
} |