|
|
10 mesi fa | |
|---|---|---|
| .github | 10 mesi fa | |
| common | 10 mesi fa | |
| controller | 10 mesi fa | |
| deploy | 10 mesi fa | |
| middleware | 10 mesi fa | |
| model | 10 mesi fa | |
| monitor | 10 mesi fa | |
| relay | 10 mesi fa | |
| router | 10 mesi fa | |
| .gitignore | 10 mesi fa | |
| Dockerfile | 10 mesi fa | |
| README.md | 10 mesi fa | |
| docker-compose.yaml | 10 mesi fa | |
| go.mod | 10 mesi fa | |
| go.sum | 10 mesi fa | |
| main.go | 10 mesi fa |
Copy docker-compose.yaml to the same directory as the aiproxy binary.
docker-compose up -d
ADMIN_KEY: The admin key for the AI Proxy Service, admin key is used to admin api and relay api, default is emptySQL_DSN: The database connection string, default is emptyLOG_SQL_DSN: The log database connection string, default is emptyREDIS_CONN_STRING: The redis connection string, default is emptyINTERNAL_TOKEN: Internal token for service authentication, default is emptyFFPROBE_ENABLED: Whether to enable ffprobe, default is falseDEBUG: Enable debug mode, default is falseDEBUG_SQL: Enable SQL debugging, default is falseDISABLE_AUTO_MIGRATE_DB: Disable automatic database migration, default is falseSQL_MAX_IDLE_CONNS: The maximum number of idle connections in the database, default is 100SQL_MAX_OPEN_CONNS: The maximum number of open connections to the database, default is 1000SQL_MAX_LIFETIME: The maximum lifetime of a connection in seconds, default is 60NOTIFY_NOTE: Custom notification note, default is emptyNOTIFY_FEISHU_WEBHOOK: The feishu notify webhook url, default is emptyDISABLE_MODEL_CONFIG: Disable model configuration, default is falseRETRY_TIMES: Number of retry attempts, default is determined at runtimeENABLE_MODEL_ERROR_AUTO_BAN: Enable automatic banning of models with errors, default is determined at runtimeMODEL_ERROR_AUTO_BAN_RATE: Rate threshold for auto-banning models with errors, default is 0.3TIMEOUT_WITH_MODEL_TYPE: Timeout settings for different model types, default is empty mapDEFAULT_CHANNEL_MODELS: Default models for each channel, default is empty mapDEFAULT_CHANNEL_MODEL_MAPPING: Model mapping for each channel, default is empty mapLOG_STORAGE_HOURS: Hours to store logs (0 means no limit), default is 0SAVE_ALL_LOG_DETAIL: Save all log details, default is determined at runtimeLOG_DETAIL_REQUEST_BODY_MAX_SIZE: Maximum size for request body in log details, default is 128KBLOG_DETAIL_RESPONSE_BODY_MAX_SIZE: Maximum size for response body in log details, default is 128KBLOG_DETAIL_STORAGE_HOURS: Hours to store log details, default is 72 (3 days)DISABLE_SERVE: Disable serving requests, default is determined at runtimeGROUP_MAX_TOKEN_NUM: Maximum number of tokens per group (0 means unlimited), default is determined at runtimeGROUP_CONSUME_LEVEL_RATIO: Consumption level ratio for groups, default is determined at runtimeGEMINI_SAFETY_SETTING: Safety setting for Gemini models, default is BLOCK_NONEBILLING_ENABLED: Enable billing functionality, default is true