{"repo": "benderick/shuoguoknowledge", "files": {"Infrastructure/AI/AiOptions.cs": {"2c3941d46f0b3f6a9366d338f371fa9c40c7592d": {"t": 1785746202.3320174, "n": 1068, "h": "b82600325b0becd5", "c": "namespace ShuoGuoKnowledge.Infrastructure.AI;\n\npublic sealed class AiOptions\n{\n public const string SectionName = \"AI\";\n\n public bool Enabled { get; set; }\n\n public string Provider { get; set; } = \"DeepSeek\";\n\n public string BaseUrl { get; set; } = \"https://api.deepseek.com\";\n\n public string ApiKey { get; set; } = string.Empty;\n\n public string Model { get; set; } = string.Empty;\n\n public string ReasoningEffort { get; set; } = string.Empty;\n\n // 这里直接对应 DeepSeek 的 thinking 开关,服务层会把它映射成兼容接口需要的扩展字段。\n public bool Thinking { get; set; }\n\n public string ResponseFormat { get; set; } = \"json_object\";\n\n public int MaxQuestions { get; set; } = 4;\n\n public string ResolveBaseUrl()\n {\n return string.IsNullOrWhiteSpace(BaseUrl)\n ? string.Empty\n : BaseUrl.Trim().TrimEnd('/');\n }\n\n public bool IsReady()\n {\n return Enabled\n && !string.IsNullOrWhiteSpace(ResolveBaseUrl())\n && !string.IsNullOrWhiteSpace(ApiKey)\n && !string.IsNullOrWhiteSpace(Model);\n }\n}"}}}}