Files
ChatBot/ChatBot/Models/Configuration/AISettings.cs
Leonid Pershin bc10232967 fix request
2025-10-17 00:14:35 +03:00

86 lines
2.7 KiB
C#

namespace ChatBot.Models.Configuration
{
/// <summary>
/// Configuration settings for AI service
/// </summary>
public class AISettings
{
/// <summary>
/// Temperature for AI response generation (0.0 to 2.0)
/// Lower values make responses more focused and deterministic
/// Higher values make responses more random and creative
/// </summary>
public double Temperature { get; set; } = 0.7;
/// <summary>
/// Path to the system prompt file
/// </summary>
public string SystemPromptPath { get; set; } = "Prompts/system-prompt.txt";
/// <summary>
/// System prompt content (loaded from file)
/// </summary>
public string SystemPrompt { get; set; } = string.Empty;
/// <summary>
/// Maximum number of retry attempts for failed requests
/// </summary>
public int MaxRetryAttempts { get; set; } = 3;
/// <summary>
/// Delay between retry attempts in milliseconds
/// </summary>
public int RetryDelayMs { get; set; } = 1000;
/// <summary>
/// Request timeout in seconds
/// </summary>
public int RequestTimeoutSeconds { get; set; } = 60;
/// <summary>
/// Enable gradual message history compression
/// </summary>
public bool EnableHistoryCompression { get; set; } = true;
/// <summary>
/// Maximum number of messages before compression starts
/// </summary>
public int CompressionThreshold { get; set; } = 20;
/// <summary>
/// Target number of messages after compression
/// </summary>
public int CompressionTarget { get; set; } = 10;
/// <summary>
/// Minimum message length to be considered for summarization (in characters)
/// </summary>
public int MinMessageLengthForSummarization { get; set; } = 50;
/// <summary>
/// Maximum length of summarized message (in characters)
/// </summary>
public int MaxSummarizedMessageLength { get; set; } = 200;
/// <summary>
/// Enable exponential backoff for retry attempts
/// </summary>
public bool EnableExponentialBackoff { get; set; } = true;
/// <summary>
/// Maximum retry delay in milliseconds
/// </summary>
public int MaxRetryDelayMs { get; set; } = 30000;
/// <summary>
/// Timeout for compression operations in seconds
/// </summary>
public int CompressionTimeoutSeconds { get; set; } = 30;
/// <summary>
/// Timeout for status check operations in seconds
/// </summary>
public int StatusCheckTimeoutSeconds { get; set; } = 10;
}
}