You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionupdate_ollama_modelsecho"Fetching list of Ollama models..."set -l jobs
ollama list | tail -n +2 |whileread -l line
set model_name (echo $line| awk '{print $1}')
iftest -n "$model_name"echo"Attempting to update model: $model_name"
ollama pull $model_name&set -a jobs$last_pidecho"Started update for model: $model_name"elseecho"No model name extracted from line: $line"
end
end
forjobin$jobswait$job
end
ollama list | tail -n +2 | awk -F"\t"'{printf $1 "\t" $3 "\t" $4 "\t" $5 RS}'echo"Ollama models update complete."
end
Fish function To update Ollama models for linux
functionupdate_ollama_modelsecho"Updating Ollama client..."
curl -fsSL https://ollama.com/install.sh | sh
if not type -q ollama
echo"Ollama command could not be found. Please check the installation."return 1
end
set -l ollama_proc (ps aux | grep '[o]llama serve')
iftest -z "$ollama_proc"echo"Ollama is not running. Starting Ollama serve..."
ollama serve &elseecho"Ollama serve is already running."
end
echo"Fetching list of Ollama models..."set -l jobs
ollama list | tail -n +2 |whileread -l line
set model_name (echo $line| awk '{print $1}')
iftest -n "$model_name"echo"Attempting to update model: $model_name"
ollama pull $model_name&set -a jobs$last_pidecho"Started update for model: $model_name"elseecho"No model name extracted from line: $line"
end
end
forjobin$jobswait$job
end
ollama list | tail -n +2 | awk -F"\t"'{printf $1 "\t" $3 "\t" $4 "\t" $5 RS}'echo"Ollama models update complete."
end