Added a lot of functionality. Bugfixes and changes
This commit is contained in:
@@ -20,7 +20,8 @@ struct Settings: Codable {
|
||||
var streamEnabled: Bool
|
||||
var maxTokens: Int
|
||||
var systemPrompt: String?
|
||||
|
||||
var customPromptMode: CustomPromptMode
|
||||
|
||||
// Feature flags
|
||||
var onlineMode: Bool
|
||||
var memoryEnabled: Bool
|
||||
@@ -58,7 +59,7 @@ struct Settings: Codable {
|
||||
case anthropicNative = "anthropic_native"
|
||||
case duckduckgo
|
||||
case google
|
||||
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .anthropicNative: return "Anthropic Native"
|
||||
@@ -67,6 +68,25 @@ struct Settings: Codable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum CustomPromptMode: String, Codable, CaseIterable {
|
||||
case append = "append"
|
||||
case replace = "replace"
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .append: return "Append to Default"
|
||||
case .replace: return "Replace Default (BYOP)"
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
switch self {
|
||||
case .append: return "Your custom prompt will be added after the default system prompt"
|
||||
case .replace: return "Only use your custom prompt (Bring Your Own Prompt)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Default settings
|
||||
static let `default` = Settings(
|
||||
@@ -79,6 +99,7 @@ struct Settings: Codable {
|
||||
streamEnabled: true,
|
||||
maxTokens: 4096,
|
||||
systemPrompt: nil,
|
||||
customPromptMode: .append,
|
||||
onlineMode: false,
|
||||
memoryEnabled: true,
|
||||
mcpEnabled: false,
|
||||
|
||||
Reference in New Issue
Block a user