diff options
author | Grail Finder <wohilas@gmail.com> | 2025-01-04 18:13:13 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-01-04 18:13:13 +0300 |
commit | 4736e43631ed21fd14741daa1dde746687d330fa (patch) | |
tree | c5dcee2930e8681397a369ae7869671bdcf568dc /config/config.go | |
parent | 461d19aa2512fea7ac07e50c3178609850ef07c3 (diff) |
Feat (RAG): tying tui calls to rag funcs [WIP; skip-ci]
RAG itself is annoying to properly implement, plucking sentences with no
context is useless. Also it should not be a part of main package, same
for goes for tui. The number of global vars is absurd.
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go index ce1b877..3c79564 100644 --- a/config/config.go +++ b/config/config.go @@ -8,7 +8,6 @@ import ( type Config struct { APIURL string `toml:"APIURL"` - EmbedURL string `toml:"EmbedURL"` ShowSys bool `toml:"ShowSys"` LogFile string `toml:"LogFile"` UserRole string `toml:"UserRole"` @@ -19,6 +18,11 @@ type Config struct { ToolIcon string `toml:"ToolIcon"` SysDir string `toml:"SysDir"` ChunkLimit uint32 `toml:"ChunkLimit"` + // embeddings + RAGEnabled bool `toml:"RAGEnabled"` + EmbedURL string `toml:"EmbedURL"` + HFToken string `toml:"HFToken"` + RAGDir string `toml:"RAGDir"` } func LoadConfigOrDefault(fn string) *Config { @@ -30,6 +34,7 @@ func LoadConfigOrDefault(fn string) *Config { if err != nil { fmt.Println("failed to read config from file, loading default") config.APIURL = "http://localhost:8080/v1/chat/completions" + config.RAGEnabled = false config.EmbedURL = "http://localhost:8080/v1/embiddings" config.ShowSys = true config.LogFile = "log.txt" |