Enha: update config
This commit is contained in:
@@ -19,7 +19,7 @@ AssistantRole = "assistant"
|
|||||||
SysDir = "sysprompts"
|
SysDir = "sysprompts"
|
||||||
ChunkLimit = 100000
|
ChunkLimit = 100000
|
||||||
AutoScrollEnabled = true
|
AutoScrollEnabled = true
|
||||||
# AutoCleanToolCallsFromCtx = false
|
AutoCleanToolCallsFromCtx = false
|
||||||
# rag settings
|
# rag settings
|
||||||
RAGBatchSize = 1
|
RAGBatchSize = 1
|
||||||
RAGWordLimit = 80
|
RAGWordLimit = 80
|
||||||
@@ -39,9 +39,12 @@ WhisperBinaryPath = "./batteries/whisper.cpp/build/bin/whisper-cli" # Path to wh
|
|||||||
WhisperModelPath = "./batteries/whisper.cpp/ggml-large-v3-turbo-q5_0.bin" # Path to whisper model file (for WHISPER_BINARY mode)
|
WhisperModelPath = "./batteries/whisper.cpp/ggml-large-v3-turbo-q5_0.bin" # Path to whisper model file (for WHISPER_BINARY mode)
|
||||||
STT_LANG = "en" # Language for speech recognition (for WHISPER_BINARY mode)
|
STT_LANG = "en" # Language for speech recognition (for WHISPER_BINARY mode)
|
||||||
STT_SR = 16000 # Sample rate for audio recording
|
STT_SR = 16000 # Sample rate for audio recording
|
||||||
|
#
|
||||||
DBPATH = "gflt.db"
|
DBPATH = "gflt.db"
|
||||||
FilePickerDir = "." # Directory where file picker should start
|
FilePickerDir = "." # Directory where file picker should start
|
||||||
FilePickerExts = "png,jpg,jpeg,gif,webp" # Comma-separated list of allowed file extensions for file picker
|
FilePickerExts = "png,jpg,jpeg,gif,webp" # Comma-separated list of allowed file extensions for file picker
|
||||||
EnableMouse = false # Enable mouse support in the UI
|
EnableMouse = false # Enable mouse support in the UI
|
||||||
CharSpecificContextEnabled = false
|
# character specific context
|
||||||
|
CharSpecificContextEnabled = true
|
||||||
CharSpecificContextTag = "__known_to_chars__"
|
CharSpecificContextTag = "__known_to_chars__"
|
||||||
|
AutoTurn = true
|
||||||
|
|||||||
@@ -26,7 +26,11 @@ type Config struct {
|
|||||||
WriteNextMsgAs string
|
WriteNextMsgAs string
|
||||||
WriteNextMsgAsCompletionAgent string
|
WriteNextMsgAsCompletionAgent string
|
||||||
SkipLLMResp bool
|
SkipLLMResp bool
|
||||||
AutoCleanToolCallsFromCtx bool `toml:"AutoCleanToolCallsFromCtx"`
|
AutoCleanToolCallsFromCtx bool `toml:"AutoCleanToolCallsFromCtx"`
|
||||||
|
DBPATH string `toml:"DBPATH"`
|
||||||
|
FilePickerDir string `toml:"FilePickerDir"`
|
||||||
|
FilePickerExts string `toml:"FilePickerExts"`
|
||||||
|
EnableMouse bool `toml:"EnableMouse"`
|
||||||
// embeddings
|
// embeddings
|
||||||
RAGEnabled bool `toml:"RAGEnabled"`
|
RAGEnabled bool `toml:"RAGEnabled"`
|
||||||
EmbedURL string `toml:"EmbedURL"`
|
EmbedURL string `toml:"EmbedURL"`
|
||||||
@@ -54,20 +58,17 @@ type Config struct {
|
|||||||
TTS_PROVIDER string `toml:"TTS_PROVIDER"`
|
TTS_PROVIDER string `toml:"TTS_PROVIDER"`
|
||||||
TTS_LANGUAGE string `toml:"TTS_LANGUAGE"`
|
TTS_LANGUAGE string `toml:"TTS_LANGUAGE"`
|
||||||
// STT
|
// STT
|
||||||
STT_TYPE string `toml:"STT_TYPE"` // WHISPER_SERVER, WHISPER_BINARY
|
STT_TYPE string `toml:"STT_TYPE"` // WHISPER_SERVER, WHISPER_BINARY
|
||||||
STT_URL string `toml:"STT_URL"`
|
STT_URL string `toml:"STT_URL"`
|
||||||
STT_SR int `toml:"STT_SR"`
|
STT_SR int `toml:"STT_SR"`
|
||||||
STT_ENABLED bool `toml:"STT_ENABLED"`
|
STT_ENABLED bool `toml:"STT_ENABLED"`
|
||||||
WhisperBinaryPath string `toml:"WhisperBinaryPath"`
|
WhisperBinaryPath string `toml:"WhisperBinaryPath"`
|
||||||
WhisperModelPath string `toml:"WhisperModelPath"`
|
WhisperModelPath string `toml:"WhisperModelPath"`
|
||||||
STT_LANG string `toml:"STT_LANG"`
|
STT_LANG string `toml:"STT_LANG"`
|
||||||
DBPATH string `toml:"DBPATH"`
|
// character spefic contetx
|
||||||
FilePickerDir string `toml:"FilePickerDir"`
|
|
||||||
FilePickerExts string `toml:"FilePickerExts"`
|
|
||||||
EnableMouse bool `toml:"EnableMouse"`
|
|
||||||
CharSpecificContextEnabled bool `toml:"CharSpecificContextEnabled"`
|
CharSpecificContextEnabled bool `toml:"CharSpecificContextEnabled"`
|
||||||
CharSpecificContextTag string `toml:"CharSpecificContextTag"`
|
CharSpecificContextTag string `toml:"CharSpecificContextTag"`
|
||||||
AutoTurn bool
|
AutoTurn bool `toml:"AutoTurn"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoadConfig(fn string) (*Config, error) {
|
func LoadConfig(fn string) (*Config, error) {
|
||||||
|
|||||||
@@ -140,6 +140,9 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
|||||||
addCheckboxRow("Auto turn (for cards with many chars)", cfg.AutoTurn, func(checked bool) {
|
addCheckboxRow("Auto turn (for cards with many chars)", cfg.AutoTurn, func(checked bool) {
|
||||||
cfg.AutoTurn = checked
|
cfg.AutoTurn = checked
|
||||||
})
|
})
|
||||||
|
addCheckboxRow("Char specific context", cfg.CharSpecificContextEnabled, func(checked bool) {
|
||||||
|
cfg.CharSpecificContextEnabled = checked
|
||||||
|
})
|
||||||
// Add dropdowns
|
// Add dropdowns
|
||||||
logLevels := []string{"Debug", "Info", "Warn"}
|
logLevels := []string{"Debug", "Info", "Warn"}
|
||||||
addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) {
|
addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user