/
afanasevn
/
PdfEncoder
Обзор
Документация
Войти
/
afanasevn
/
PdfEncoder
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/PdfEncoder.Application/Options/LlmModelOptions.cs
42 строки
1 KB
IBS\NAfanasev
Parse results functional update
07 июл 2026, 00:06
07 июл 2026, 00:06
8e97443
Код
Авторство
О чём код?
namespace PdfEncoder.Application.Options; /// <summary> /// Настройки подключения к OpenAI-compatible LLM gateway. /// </summary> public sealed class LlmModelOptions { public const string SectionName = "Llm"; public string BaseUrl { get; init; } = string.Empty; public string ApiKey { get; init; } = string.Empty; public string ClassificationModel { get; init; } = "yandex/yandexgpt-lite"; public string ExtractionModel { get; init; } = "yandex/yandexgpt-lite"; public string? FallbackExtractionModel { get; init; } public double FallbackConfidenceThreshold { get; init; } = 0.7; public int MaxPagesForLlm { get; init; } = 3; public int MaxTokens { get; init; } = 4096; public int TimeoutSeconds { get; init; } = 60; public double Temperature { get; init; } = 0.1; public bool SkipLlm { get; init; } /// <summary> /// Генерировать content hint при типе unknown (требует <see cref="SkipLlm"/> = false). /// </summary> public bool EnableContentHintForUnknown { get; init; } = true; /// <summary> /// Использовать native <c>response_format: json_object</c> (Q-05 spike). /// При false — только prompt-based JSON extraction. /// </summary> public bool UseNativeJsonObject { get; init; } = true; }