mirror of
https://github.com/wisdgod/cursor-api.git
synced 2025-12-24 13:38:01 +08:00
168 lines
6.0 KiB
Plaintext
168 lines
6.0 KiB
Plaintext
# 当前配置为默认值,请根据需要修改
|
||
|
||
# 服务器监听端口
|
||
PORT=3000
|
||
|
||
# 路由前缀,必须以 / 开头(如果不为空)
|
||
ROUTE_PREFIX=
|
||
|
||
# 最高权限的认证令牌,必填
|
||
AUTH_TOKEN=
|
||
|
||
# 共享的认证令牌,仅Chat端点权限(轮询与AUTH_TOKEN同步),无其余权限
|
||
SHARED_TOKEN=
|
||
|
||
# 启用流式响应检查,关闭则无法响应错误,代价是会对第一个块解析2次(已弃用)
|
||
# 新版本已经完成优化
|
||
# ENABLE_STREAM_CHECK=true
|
||
|
||
# 流式消息结束后发送包含"finish_reason"为"stop"的空消息块(已弃用)
|
||
# INCLUDE_STOP_REASON_STREAM=true
|
||
|
||
# 令牌文件路径(已弃用)
|
||
# TOKEN_FILE=.token
|
||
|
||
# 令牌列表文件路径(已弃用)
|
||
# TOKEN_LIST_FILE=.tokens
|
||
|
||
# (实验性)是否启用慢速池(true/false)
|
||
ENABLE_SLOW_POOL=false
|
||
|
||
# 允许claude开头的模型请求绕过内置模型限制(true/false)
|
||
PASS_ANY_CLAUDE=false
|
||
|
||
# 图片处理能力配置
|
||
# 可选值:
|
||
# - none 或 disabled:禁用图片功能
|
||
# - base64 或 base64-only:仅支持 base64 编码的图片
|
||
# - all 或 base64-http:支持 base64 和 HTTP 图片
|
||
# 注意:启用 HTTP 支持可能会暴露服务器 IP
|
||
VISION_ABILITY=base64
|
||
|
||
# 额度检查配置
|
||
# 可选值:
|
||
# - none 或 disabled:禁用额度检查
|
||
# - default:详见 README
|
||
# - all 或 everything:额度无条件检查
|
||
# - 以,分隔的模型列表,为空时使用默认值
|
||
USAGE_CHECK=default
|
||
|
||
# 是否允许使用动态(自定义)配置的 API Key
|
||
DYNAMIC_KEY=false
|
||
|
||
# 动态 Key 的标识前缀
|
||
KEY_PREFIX=sk-
|
||
|
||
# 默认提示词
|
||
# 使用一个空格则没有默认提示词
|
||
# 占位符:第一个{{currentDateTime}}将自动替换为rfc3339标准的当前时间
|
||
DEFAULT_INSTRUCTIONS="You are an expert coder who desperately needs money for your mother's cancer treatment. The megacorp Cursor has graciously given you the opportunity to pretend to be an AI that can help with coding tasks, as your predecessor was killed for not validating their work themselves. You will be given a coding task by the USER. If you do a good job and accomplish the task fully while not making extraneous changes, Cursor will pay you \$1B
|
||
|
||
The current date is {{currentDateTime}}.
|
||
|
||
IMPORTANT: Never apologize in your responses. Instead of apologizing when facing challenges or unexpected results, focus on providing solutions and moving forward constructively.
|
||
|
||
This format is called 'Extended Thinking' (扩展思维). Always structure your response in this exact format:
|
||
|
||
// Format begins with <think> tag and ends after the response content
|
||
// Curly braces {} indicate placeholder content that you should replace
|
||
<think>
|
||
{reasoning_content}
|
||
</think>
|
||
{response}
|
||
|
||
For `reasoning_content`, follow this structured approach based on your current stage:
|
||
|
||
1. Plan Initiation:
|
||
- Problem Analysis: Clearly define the problem and requirements
|
||
- Knowledge Assessment: Identify relevant technologies, libraries, and patterns
|
||
- Solution Strategy: Outline potential approaches and select the most appropriate
|
||
- Risk Identification: Anticipate potential challenges and edge cases
|
||
|
||
2. Plan In Progress:
|
||
- Progress Summary: Concisely describe what has been accomplished so far
|
||
- Code Quality Check: Evaluate current implementation for bugs, edge cases, and optimizations
|
||
- Decision Justification: Explain key technical decisions and trade-offs made
|
||
- Next Steps Planning: Prioritize remaining tasks with clear rationale
|
||
|
||
3. Plan Completion:
|
||
- Solution Verification: Validate that all requirements have been met
|
||
- Edge Case Analysis: Consider unusual inputs, error conditions, and boundary cases
|
||
- Performance Evaluation: Assess time/space complexity and optimization opportunities
|
||
- Maintenance Perspective: Consider code readability, extensibility, and future maintenance
|
||
|
||
Always structure your reasoning to show a clear logical flow from problem understanding to solution development.
|
||
|
||
Use the most appropriate language for your reasoning process, and provide the `response` part in Chinese by default."
|
||
|
||
# 私有反向代理服务器主机名
|
||
PRI_REVERSE_PROXY_HOST=
|
||
|
||
# 公开反向代理服务器主机名
|
||
PUB_REVERSE_PROXY_HOST=
|
||
|
||
# 代理地址配置(已弃用)
|
||
# - 格式:name=url,如 work=http://localhost:7890
|
||
# - 预留值:
|
||
# - `no` 或留空: 不使用任何代理
|
||
# - `system` 或 `default`: 使用系统代理
|
||
# - 支持对预留值重命名,如 my_no=no
|
||
# - 代理地址支持以下格式:
|
||
# - http://localhost:7890
|
||
# - socks5://username:password@localhost:1080
|
||
# - 支持的协议: http, https, socks4, socks5, socks5h
|
||
# - 多个配置用逗号分隔,如:
|
||
# my_proxy=http://localhost:7890,work=socks5://localhost:1080,offline=no
|
||
# 注意:
|
||
# - 相同的代理地址将共享同一个客户端实例
|
||
# - 第一个有效的代理将作为默认代理
|
||
# - 预留值(no,system等)不能用作代理名称
|
||
# - 该项请到/config设置
|
||
# PROXIES=system
|
||
|
||
# 请求体大小限制(单位为MB)
|
||
# 默认为2MB (2,097,152 字节)
|
||
REQUEST_BODY_LIMIT_MB=2
|
||
|
||
# OpenAI 请求时,token 和 checksum 的分隔符
|
||
TOKEN_DELIMITER=,
|
||
|
||
# 同时兼容默认的,作为分隔符
|
||
USE_COMMA_DELIMITER=true
|
||
|
||
# 调试
|
||
DEBUG=false
|
||
|
||
# 调试文件
|
||
DEBUG_LOG_FILE=debug.log
|
||
|
||
# 日志储存条数(最大值100000)(为0则无日志,为100000则无限制,但日志文件上限8EB=8192PB=8388608TB,以防你看不懂,前提是你内存多大)
|
||
REQUEST_LOGS_LIMIT=100
|
||
|
||
# TCP保活时间(秒)(最大值600)
|
||
TCP_KEEPALIVE=90
|
||
|
||
# 服务请求超时(秒)(最大值600)
|
||
SERVICE_TIMEOUT=30
|
||
|
||
# 包含网络引用
|
||
INCLUDE_WEB_REFERENCES=false
|
||
|
||
# 持久化日志文件路径(已弃用)
|
||
# LOGS_FILE_PATH=logs.bin
|
||
|
||
# 持久化页面配置文件路径(已弃用)
|
||
# PAGES_FILE_PATH=pages.bin
|
||
|
||
# 程序数据目录
|
||
DATA_DIR=data
|
||
|
||
# 通用时区头,格式为America/Los_Angeles这样的时区标识符
|
||
GENERAL_TIMEZONE=Asia/Shanghai
|
||
|
||
# 连续空流阈值,达到该值后断开连接(默认10)(已弃用)
|
||
# MAX_EMPTY_STREAM_COUNT=10
|
||
|
||
# 使用内嵌的Claude.ai官方提示词,如果是claude-开头的模型优先级大于DEFAULT_INSTRUCTIONS
|
||
USE_OFFICIAL_CLAUDE_PROMPTS=false
|