init(all):一个让codex调用deepseek模型的项目
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# ==== codex_proxy 配置文件 ====
|
||||
# 复制此文件为 .env 并填入你的配置
|
||||
|
||||
# 必填:DeepSeek API Key(从 https://platform.deepseek.com/api_keys 获取)
|
||||
DEEPSEEK_API_KEY=*********
|
||||
|
||||
# 本服务的API Key,用于代理请求
|
||||
MY_API_KEY=sk-1234567890
|
||||
|
||||
# 默认模型
|
||||
MODEL_DEFAULT = deepseek-v4-flash
|
||||
|
||||
## codex模型对应,为空则使用默认模型
|
||||
MODEL_GTP5_5 = deepseek-v4-pro
|
||||
MODEL_GTP5_4 = deepseek-v4-flash
|
||||
MODEl_GPT5_4_MINI = deepseek-v4-flash
|
||||
MODEL_GTP5_3_CODEX = deepseek-v4-flash
|
||||
MODEL_GTP5_2 = deepseek-v4-flash
|
||||
|
||||
# 可选:DeepSeek API 地址(默认官方地址,一般无需修改)
|
||||
# DEEPSEEK_URL=https://api.deepseek.com/v1/chat/completions
|
||||
|
||||
# 可选:调试日志,设为 1 开启
|
||||
# DEEPSEEK_DEBUG=1
|
||||
@@ -0,0 +1,38 @@
|
||||
# ============================================================
|
||||
# Codex DeepSeek Proxy — Docker Compose 编排
|
||||
# ============================================================
|
||||
# 使用:
|
||||
# docker compose -f docker/docker-compose.yml up -d # 启动
|
||||
# docker compose -f docker/docker-compose.yml logs -f # 日志
|
||||
# docker compose -f docker/docker-compose.yml down # 停止
|
||||
# docker compose -f docker/docker-compose.yml restart # 重启
|
||||
# ============================================================
|
||||
|
||||
services:
|
||||
proxy:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
image: codex2deepseek:latest
|
||||
container_name: codex2deepseek
|
||||
ports:
|
||||
- "127.0.0.1:12345:12345"
|
||||
env_file:
|
||||
- ../.env
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
reservations:
|
||||
memory: 128M
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('localhost', 12345), timeout=5).close()"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
Reference in New Issue
Block a user