-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.example.toml
More file actions
48 lines (35 loc) · 2.11 KB
/
config.example.toml
File metadata and controls
48 lines (35 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# node-token 配置示例
# 复制为 config.toml 并填写实际值
# KeyCompute 服务端 URL(必需)
server_url = "http://localhost:3000"
# 注册 token(从 KeyCompute 配置获取,必需)
registration_token = "change-me-node-registration-token"
# 节点显示名称(必需)
display_name = "My KeyCompute Node"
# 本地 Ollama URL(可选,默认 http://localhost:11434)
ollama_url = "http://localhost:11434"
# 心跳间隔(秒,可选,默认 30)
heartbeat_interval_secs = 30
# Excluded 节点 poll 检查间隔(秒,可选,默认 30)
# 节点被 excluded 后,poll 循环定期检查是否恢复
excluded_poll_check_interval_secs = 30
# 最大并发任务数(可选,默认 2)
# 控制同时执行的任务数量,防止过多任务并发导致资源耗尽
max_concurrent_tasks = 2
# 本地数据目录(可选,默认 ~/.local/share/node-token)
# data_dir = "/path/to/data"
# ──────────────────────────────────────────────────────────────────────────────
# Docker Compose Ollama 配置(仅 Docker 部署有效,二进制启动不读取)
# 配置 Ollama 容器的模型保活、端口映射、自动拉取模型等
# 对应 .env: OLLAMA_KEEP_ALIVE, OLLAMA_PORT, OLLAMA_MODEL, OLLAMA_WARMUP_PROMPT
# ──────────────────────────────────────────────────────────────────────────────
# 模型在内存中的保活时间(可选,默认 30m)
# 设置为 -1 表示常驻内存
# ollama_keep_alive = "30m"
# Ollama API 对外端口映射(可选,默认 11434)
# ollama_port = 11434
# 容器启动后自动拉取并预热的模型名称(可选,默认 gemma3:270m)
# ollama_model = "gemma3:270m"
# 预热模型时发送的简短提示词(可选,默认 ready)
# 预热推理会让模型加载到内存中,减少首次请求的响应延迟
# ollama_warmup_prompt = "ready"