namespace YoutubeSummarizer.Configuration;
///
/// Root configuration object bound from appsettings.json.
/// Only OpenAI and Summarizer sections are required.
///
public sealed class AppSettings
{
public LlmSettings LLM { get; init; } = new();
public SummarizerSettings Summarizer { get; init; } = new();
}
///
/// Settings for the LLM API (OpenAI or Ollama).
///
public sealed class LlmSettings
{
///
/// Base URL for the API.
/// For OpenAI: https://api.openai.com/v1
/// For Ollama: http://localhost:11434/v1
///
public string BaseUrl { get; init; } = "https://api.openai.com/v1";
/// Your API key. (For Ollama, any value works).
public string ApiKey { get; init; } = string.Empty;
///
/// Model to use.
/// OpenAI: gpt-4o-mini, gpt-4o
/// Ollama: qwen3:14b, llama3.1
///
public string Model { get; init; } = "gpt-4o-mini";
/// Max tokens for the summary response (not the input).
public int MaxTokens { get; init; } = 1500;
/// Timeout in seconds for API calls.
public int TimeoutSeconds { get; init; } = 100;
}
///
/// Controls summarization behavior.
///
public sealed class SummarizerSettings
{
///
/// Approximate word count at which we split a long transcript into chunks
/// before doing a final "summary of summaries" pass. This keeps individual
/// API calls within model context limits.
///
public int ChunkWordLimit { get; init; } = 3000;
/// When true, prints the full transcript text before summarizing.
public bool ShowTranscript { get; init; } = false;
}