add gemeni pro support (#1307)

This commit is contained in:
Shuchang Zheng
2024-12-02 15:51:18 -08:00
committed by GitHub
parent 7f6b2c0929
commit 57e6404881
4 changed files with 37 additions and 0 deletions

View File

@@ -98,6 +98,23 @@ setup_llm_providers() {
update_or_add_env_var "ENABLE_AZURE" "false"
fi
#Gemini Configuartion
echo "To enable Gemini, you must have an Gemini API key."
read -p "Do you want to enable Gemini (y/n)? " enable_gemini
if [[ "$enable_gemini" == "y" ]]; then
read -p "Enter your Gemini API key: " gemini_api_key
if [ -z "$gemini_api_key" ]; then
echo "Error: Gemini API key is required."
echo "Gemini will not be enabled."
else
update_or_add_env_var "GEMINI_API_KEY" "$gemini_api_key"
update_or_add_env_var "ENABLE_GEMINI" "true"
model_options+=("GEMINI_PRO")
fi
else
update_or_add_env_var "ENABLE_GEMINI" "false"
fi
# Model Selection
if [ ${#model_options[@]} -eq 0 ]; then
echo "No LLM providers enabled. You won't be able to run Skyvern unless you enable at least one provider. You can re-run this script to enable providers or manually update the .env file."