#!/bin/bash

# 创建API配置目录
mkdir -p /home/will/docker/silly/config/api_configs

# 创建各个API提供商的配置文件
cat > /home/will/docker/silly/config/api_configs/openai.json << 'EOF'
{
    "name": "OpenAI",
    "type": "openai",
    "url": "https://api.openai.com/v1",
    "models": [
        "gpt-4o",
        "gpt-4o-mini",
        "gpt-4-turbo",
        "gpt-3.5-turbo"
    ],
    "default_model": "gpt-4o-mini"
}
EOF

cat > /home/will/docker/silly/config/api_configs/claude.json << 'EOF'
{
    "name": "Claude",
    "type": "claude",
    "url": "https://api.anthropic.com/v1",
    "models": [
        "claude-3-5-sonnet-20241022",
        "claude-3-haiku-20240307",
        "claude-3-opus-20240229"
    ],
    "default_model": "claude-3-haiku-20240307"
}
EOF

cat > /home/will/docker/silly/config/api_configs/deepseek.json << 'EOF'
{
    "name": "DeepSeek",
    "type": "openai",
    "url": "https://api.deepseek.com/v1",
    "models": [
        "deepseek-chat",
        "deepseek-coder"
    ],
    "default_model": "deepseek-chat"
}
EOF

cat > /home/will/docker/silly/config/api_configs/kimi.json << 'EOF'
{
    "name": "Kimi",
    "type": "openai",
    "url": "https://api.moonshot.cn/v1",
    "models": [
        "moonshot-v1-8k",
        "moonshot-v1-32k",
        "moonshot-v1-128k"
    ],
    "default_model": "moonshot-v1-8k"
}
EOF

cat > /home/will/docker/silly/config/api_configs/gemini.json << 'EOF'
{
    "name": "Gemini",
    "type": "openai",
    "url": "https://generativelanguage.googleapis.com/v1beta",
    "models": [
        "gemini-pro",
        "gemini-pro-vision"
    ],
    "default_model": "gemini-pro"
}
EOF

echo "API configurations created successfully!"