From 39e099cbe9c5b292726f58bebe922d1db7c6cbfa Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sun, 12 Apr 2026 09:02:32 +0300 Subject: [PATCH] Enha: flag to pass model name --- bot.go | 2 ++ cli-tests/sort-img/run.sh | 1 + cli-tests/sort-text/run.sh | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bot.go b/bot.go index 7d9620b..78e6585 100644 --- a/bot.go +++ b/bot.go @@ -1774,6 +1774,7 @@ func init() { // parse flags flag.BoolVar(&cfg.CLIMode, "cli", false, "Run in CLI mode without TUI") flag.BoolVar(&cfg.ToolUse, "tools", true, "run with tools") + flag.StringVar(&cfg.CurrentModel, "model", "modelname", "name of the model to use") flag.StringVar(&cliCardPath, "card", "", "Path to syscard JSON file") flag.BoolVar(&cliContinue, "continue", false, "Continue from last chat (by agent or card)") flag.StringVar(&cliMsg, "msg", "", "Send message and exit (one-shot mode)") @@ -1781,6 +1782,7 @@ func init() { if !cfg.CLIMode { initTUI() } + chatBody.Model = cfg.CurrentModel go updateModelLists() tools.InitTools(cfg, logger, store) // tooler = tools.InitTools(cfg, logger, store) diff --git a/cli-tests/sort-img/run.sh b/cli-tests/sort-img/run.sh index 5cd5d3e..efb6fee 100755 --- a/cli-tests/sort-img/run.sh +++ b/cli-tests/sort-img/run.sh @@ -22,4 +22,5 @@ go run . -cli -msg "$TASK" echo "" echo "=== Done ===" +cp "$LOG_FILE" "$SCRIPT_DIR/latest_run.log" echo "Log file: $LOG_FILE" diff --git a/cli-tests/sort-text/run.sh b/cli-tests/sort-text/run.sh index 5cd5d3e..3bd5cb9 100755 --- a/cli-tests/sort-text/run.sh +++ b/cli-tests/sort-text/run.sh @@ -17,9 +17,11 @@ echo "=== Running setup ===" echo "" echo "=== Running task ===" TASK=$(cat "$SCRIPT_DIR/task.txt") +LMODEL=${LMODEL:-gemma-4-31B-it-Q4_K_M} cd /home/grail/projects/plays/goplays/gf-lt -go run . -cli -msg "$TASK" +go run . -cli -msg "$TASK" -model "$LMODEL" echo "" echo "=== Done ===" +cp "$LOG_FILE" "$SCRIPT_DIR/latest_run.log" echo "Log file: $LOG_FILE"