codex wip
This commit is contained in:
+14
-2
@@ -18,11 +18,21 @@ namespace AnotherReplayReader
|
||||
public string ApiKey { get; set; } = string.Empty;
|
||||
public List<AiModel> Models { get; set; } = [];
|
||||
|
||||
public double DefaultTemperature { get; set; } = 0.75;
|
||||
public double DefaultTemperature { get; set; } = 0.35;
|
||||
public double DefaultTopP { get; set; } = 0.95;
|
||||
public int DefaultMaxTokens { get; set; } = 16384;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// AI 分析提示词配置。
|
||||
/// </summary>
|
||||
public class AiPromptSettings
|
||||
{
|
||||
public bool UseCustomSystemPrompt { get; set; }
|
||||
public string CustomSystemPrompt { get; set; } = string.Empty;
|
||||
public string AdditionalRules { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 模型条目
|
||||
/// </summary>
|
||||
@@ -270,6 +280,7 @@ namespace AnotherReplayReader
|
||||
public class AiSettings
|
||||
{
|
||||
public List<AiProvider> Providers { get; set; } = [];
|
||||
public AiPromptSettings Prompt { get; set; } = new();
|
||||
|
||||
// 以下两个不持久化,由 UI 层维护当前选中项
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
@@ -289,6 +300,7 @@ namespace AnotherReplayReader
|
||||
var settings = JsonSerializer.Deserialize<AiSettings>(json);
|
||||
if (settings is { } value && value.Providers.Count > 0)
|
||||
{
|
||||
value.Prompt ??= new AiPromptSettings();
|
||||
return settings;
|
||||
}
|
||||
}
|
||||
@@ -342,4 +354,4 @@ namespace AnotherReplayReader
|
||||
File.WriteAllText(ConfigPath, json);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user