From 80f5f100f15c9e25c5da2b323820c8a81f7ca7e2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 12 Oct 2026 09:52:37 -0700 Subject: [PATCH] llm, add shortcuts for calling chat and code bots. --- tasks/workstation/linux/software/llm.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tasks/workstation/linux/software/llm.yml b/tasks/workstation/linux/software/llm.yml index 82ff711..2e13e14 100644 --- a/tasks/workstation/linux/software/llm.yml +++ b/tasks/workstation/linux/software/llm.yml @@ -609,7 +609,7 @@ alias pull-models="pull_llms " alias pull-ai="pull_llms " - function ollama_stop { + function ollama_stop() { for model in `ollama ps | tail -n +2 | awk '{print $1}'`; do echo "Stopping ${model}..." ollama stop $model @@ -620,6 +620,18 @@ alias ollama-killall="ollama_stop" alias ollama-kill-all="ollama_stop" alias ollama-stop-all="ollama_stop" + + function ollama_chat() { + ollama run {{ 'ollama3.8:27b' if ansible_memtotal_mb > 32000 else 'ollama3.5:4b' }} + } + alias ollama-chat="ollama_chat " + alias chat="ollama_chat " + + function ollama_code() { + ollama run {{ 'ollama3-coder:30b' if ansible_memtotal_mb > 32000 else 'ollama2.5-coder:7b' }} + } + alias ollama-code="ollama_code " + alias code="ollama_code " state: present create: false backup: true