-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathAppSetting.cs
33 lines (30 loc) · 1.06 KB
/
AppSetting.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace ja_learner;
public class AppSettingOptions
{
public int Port { get; set; } = 8080;
public string HttpProxy { get; set; } = string.Empty;
public GPTOptions? GPT { get; set; }
public bool AnkiEnabled { get; set; } = false;
public AnkiOptions? Anki { get; set; }
}
public class GPTOptions
{
public string ApiKey { get; set; } = string.Empty;
public string ApiUrl { get; set; } = string.Empty;
public string ExtraPromptDir { get; set; } = string.Empty;
public string TranslatePrompt { get; set; } = string.Empty;
public string ExplainPrompt { get; set; } = string.Empty;
}
public class AnkiOptions
{
public string AnkiConnectUrl { get; set; } = string.Empty;
public string Deck { get; set; } = string.Empty;
public string Model { get; set; } = string.Empty;
public class Fields
{
public string Word { get; set; } = string.Empty;
public string Example { get; set; } = string.Empty;
public string Explain { get; set; } = string.Empty;
};
public Fields? FieldNames { get; set; }
}