58 lines
1.6 KiB
Bash
58 lines
1.6 KiB
Bash
#!/bin/bash
|
|
|
|
ENV_FILE=".env"
|
|
CONFIG_FILE="config/litellm_config.yaml"
|
|
|
|
echo "🔌 Add Provider to LLM Hub"
|
|
echo "=========================="
|
|
echo ""
|
|
echo "1. Groq (Fast)"
|
|
echo "2. Mistral (Volume)"
|
|
echo "3. Anthropic Claude (Quality)"
|
|
echo "4. Moonshot Kimi (Cheap/128K)"
|
|
echo "5. OpenRouter (Free tier access)"
|
|
echo "6. Cohere (Embeddings)"
|
|
echo "7. DeepSeek (Cheap reasoning)"
|
|
echo "8. Exit"
|
|
read -p "Select (1-8): " choice
|
|
|
|
read -p "Enter API Key: " api_key
|
|
|
|
case $choice in
|
|
1)
|
|
read -p "Instance number (1,2,3...): " num
|
|
var="GROQ_API_KEY_$num"
|
|
echo "$var=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added Groq key as $var"
|
|
;;
|
|
2)
|
|
echo "MISTRAL_API_KEY=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added Mistral"
|
|
;;
|
|
3)
|
|
echo "ANTHROPIC_API_KEY=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added Claude (remember: expensive, use sparingly)"
|
|
;;
|
|
4)
|
|
echo "MOONSHOT_API_KEY=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added Kimi (great for coding!)"
|
|
;;
|
|
5)
|
|
echo "OPENROUTER_API_KEY=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added OpenRouter (access free tier models)"
|
|
;;
|
|
6)
|
|
echo "COHERE_API_KEY=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added Cohere (embeddings)"
|
|
;;
|
|
7)
|
|
echo "DEEPSEEK_API_KEY=$api_key" >> "$ENV_FILE"
|
|
echo "✅ Added DeepSeek (cheap reasoning)"
|
|
;;
|
|
8) exit 0 ;;
|
|
*) echo "Invalid choice" ; exit 1 ;;
|
|
esac
|
|
|
|
read -p "Restart services to apply? (y/N): " restart
|
|
[[ $restart =~ ^[Yy]$ ]] && docker-compose restart
|