diff options
| author | Grail Finder <wohilas@gmail.com> | 2025-12-14 10:04:48 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2025-12-14 10:04:48 +0300 |
| commit | c001dedc7da5a8bf47e3b8f6700c3e50b88c6f34 (patch) | |
| tree | dc034b4762b125e497f8d9b87cb976a3053a86c4 /props_table.go | |
| parent | 3a514e0d785e4f127e4f2dcc7dedf433d000f37f (diff) | |
| parent | 1d5af981b5b3e082b19e362ba125268bd5e676b0 (diff) | |
Merge branch 'master' into doc/tutorial
Diffstat (limited to 'props_table.go')
| -rw-r--r-- | props_table.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/props_table.go b/props_table.go index 7807522..dd359f4 100644 --- a/props_table.go +++ b/props_table.go @@ -4,6 +4,7 @@ import ( "fmt" "slices" "strconv" + "strings" "github.com/gdamore/tcell/v2" "github.com/rivo/tview" @@ -134,9 +135,16 @@ func makePropsTable(props map[string]float32) *tview.Table { addListPopupRow("Select an api", apiLinks, cfg.CurrentAPI, func(option string) { cfg.CurrentAPI = option }) + var modelList []string + // INFO: modelList is chosen based on current api link + if strings.Contains(cfg.CurrentAPI, "api.deepseek.com/") { + modelList = []string{chatBody.Model, "deepseek-chat", "deepseek-reasoner"} + } else if strings.Contains(cfg.CurrentAPI, "opentouter.ai") { + modelList = ORFreeModels + } else { // would match on localhost but what if llama.cpp served non localy? + modelList = LocalModels + } // Prepare model list dropdown - modelList := []string{chatBody.Model, "deepseek-chat", "deepseek-reasoner"} - modelList = append(modelList, ORFreeModels...) addListPopupRow("Select a model", modelList, chatBody.Model, func(option string) { chatBody.Model = option }) |
