diff --git a/switch_llm_provider.sh b/switch_llm_provider.sh index 20b117b04..dae94d72d 100644 --- a/switch_llm_provider.sh +++ b/switch_llm_provider.sh @@ -17,4 +17,14 @@ elif [ "$1" = "openai" ] || [ -z "$1" ]; then export OPENAI_API_BASE=https://api.openai.com/v1 export OPENAI_API_KEY=$(echo $OAI_API_KEY) echo "OpenAI configuration initiated with model $MODEL_NAME." +elif [ "$1" = "ollama" ]; then + # Check for a second argument for the model name, default to a custom model if not provided + MODEL_NAME=${2:-default-ollama-model} + # Set environment variables for Ollama local configuration with dynamic model name + export OPENAI_MODEL_NAME=$MODEL_NAME + export OPENAI_API_BASE=http://127.0.0.1:11434 + export OPENAI_API_KEY=$(echo $OLLAMA_API_KEY) + # Set up SSH public key + export SSH_PUBLIC_KEY="ssh-ed25519 AAAA..." + echo "Ollama local model configuration initiated with model $MODEL_NAME. fi