|
|
8 месяцев назад | |
|---|---|---|
| .github | 8 месяцев назад | |
| core | 8 месяцев назад | |
| openapi-mcp | 8 месяцев назад | |
| Dockerfile | 8 месяцев назад | |
| LICENSE | 10 месяцев назад | |
| README.md | 8 месяцев назад | |
| README.zh.md | 8 месяцев назад | |
| go.work | 8 месяцев назад | |
| go.work.sum | 8 месяцев назад |
English | 简体中文
Next-generation AI gateway, using OpenAI as the protocol entry point.
<think> split to reasoning_contentSwagger documentation support http://host:port/swagger/index.htmlUse Sealos built-in model capabilities, click to Sealos.
Use AI Proxy to access models, click to FastGPT.
docker run -d --name aiproxy -p 3000:3000 -v $(pwd)/aiproxy:/aiproxy ghcr.io/labring/aiproxy:latest
Copy docker-compose.yaml to directory.
docker-compose up -d
LISTEN: The listen address, default is :3000ADMIN_KEY: The admin key for the AI Proxy Service, admin key is used to admin api and relay api, default is emptyINTERNAL_TOKEN: Internal token for service authentication, default is emptyFFMPEG_ENABLED: Whether to enable ffmpeg, default is falseDEBUG: Enable debug mode, default is falseDEBUG_SQL: Enable SQL debugging, default is falseSQL_DSN: The database connection string, default is empty, eg: postgres://postgres:postgres@localhost:5432/postgresLOG_SQL_DSN: The log database connection string, default is empty, eg: postgres://postgres:postgres@localhost:5432/postgresREDIS_CONN_STRING: The redis connection string, default is empty, eg: redis://localhost:6379DISABLE_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 60SQLITE_PATH: The path to the sqlite database, default is aiproxy.dbSQL_BUSY_TIMEOUT: The busy timeout for the database, default is 3000NOTIFY_NOTE: Custom notification note, default is AI ProxyNOTIFY_FEISHU_WEBHOOK: The feishu notify webhook url, default is empty, eg: https://open.feishu.cn/open-apis/bot/v2/hook/xxxxDISABLE_MODEL_CONFIG: Disable model configuration, default is falseRETRY_TIMES: Number of retry attempts, default is 0ENABLE_MODEL_ERROR_AUTO_BAN: Enable automatic banning of models with errors, default is falseMODEL_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 {}DEFAULT_CHANNEL_MODELS: Default models for each channel, default is {}DEFAULT_CHANNEL_MODEL_MAPPING: Model mapping for each channel, default is {}LOG_STORAGE_HOURS: Hours to store logs (0 means unlimited), default is 0LOG_CONTENT_STORAGE_HOURS: Hours to store log content ip endpoint ttfb_milliseconds, default is 0SAVE_ALL_LOG_DETAIL: Save all log details, default is falseLOG_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)CLEAN_LOG_BATCH_SIZE: Batch size for cleaning logs, cleaning interval is 1 minute, default is 2000DISABLE_SERVE: Disable serving requests, default falseGROUP_MAX_TOKEN_NUM: Maximum number of tokens per group (0 means unlimited), default is 0GROUP_CONSUME_LEVEL_RATIO: Consumption level ratio for groups, default is {}GEMINI_SAFETY_SETTING: Safety setting for Gemini models, default is BLOCK_NONEBILLING_ENABLED: Enable billing functionality, default is trueIP_GROUPS_THRESHOLD: IP group threshold, when the same IP is used by multiple groups, send a warning, default is 0IP_GROUPS_BAN_THRESHOLD: IP group ban threshold, when the same IP is used by multiple groups, ban it and all groups, default is 0