From caf2ddc0cc7d9360f52a8971b236c118124e7e55 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 6 Apr 2025 16:20:35 +0200 Subject: [PATCH] ai text selection response: dont exit if no ollama model loaded --- .config/ags/scripts/ai/primary-buffer-query.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/ags/scripts/ai/primary-buffer-query.sh b/.config/ags/scripts/ai/primary-buffer-query.sh index 50aeba222..a4356b4b6 100755 --- a/.config/ags/scripts/ai/primary-buffer-query.sh +++ b/.config/ags/scripts/ai/primary-buffer-query.sh @@ -10,7 +10,7 @@ If you do not know the answer, simply say 'No info available'. \ Only respond for the appropriate case and use as little text as possible.\ The content:" -first_loaded_model=$("$(dirname "$0")/show-loaded-ollama-models.sh" -j | jq -r '.[0].model') +first_loaded_model=$("$(dirname "$0")/show-loaded-ollama-models.sh" -j | jq -r '.[0].model' 2>/dev/null) || first_loaded_model="" model=${first_loaded_model:-"llama3.2"} # Parse command-line arguments