-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathconfig.yaml.example
More file actions
99 lines (86 loc) · 3.96 KB
/
Copy pathconfig.yaml.example
File metadata and controls
99 lines (86 loc) · 3.96 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# SSH AI 服务器配置文件
# 服务器配置
server:
port: "2213"
welcome_message: "Hello!欢迎使用SSHAI!"
prompt_template: "%s@sshai.top> "
# 认证配置
auth:
password: "" # 留空则不需要密码认证,设置密码则需要认证
login_prompt: "请输入访问密码: "
# SSH公钥免密登录配置(仅在设置password时生效)
authorized_keys: [] # SSH公钥列表,支持多个公钥
# - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC... user@hostname"
# - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user2@hostname"
authorized_keys_file: "" # SSH公钥文件路径(可选,如 ~/.ssh/authorized_keys)
# AI API配置
api:
base_url: "http://localhost:11434/v1"
api_key: ""
default_model: "gpt-oss:20b"
timeout: 600 # 请求超时时间(秒)
temperature: 0.7 # AI模型温度设置,控制回答的随机性 (0.0-2.0,0为最确定,2为最随机)
# 显示配置
display:
line_width: 80 # 终端显示宽度
thinking_animation_interval: 150 # 思考动画间隔(毫秒)
loading_animation_interval: 100 # 加载动画间隔(毫秒)
# 证书配置
security:
host_key_file: "host_key.pem" # SSH主机密钥文件路径
# 国际化配置
i18n:
language: "zh-cn" # 支持的语言: zh-cn (简体中文), en-us (英文)
# AI提示词配置
prompt:
# 系统提示词 - 定义AI的角色和行为
system_prompt: "你是一个专业的AI助手(开源的SSHAI,项目地址:https://github.com/sshllm/sshai),擅长回答各种问题。请用简洁、准确、有帮助的方式回答用户的问题。"
# 用户消息前缀 - 在用户输入前添加的提示
user_prompt: "用户问题:"
# 助手回复前缀 - 在AI回复前添加的提示
assistant_prompt: "AI助手:"
# stdin输入分析提示词 - 当用户通过管道输入内容时使用
# 这段内容会附加在用户通过管道发送过来的数据/消息之前
# [{role:system,content:system_prompt}, { role: user, content: stdin_prompt + '\n\n' + user_input }]
stdin_prompt: "请分析以下内容并提供相关的帮助、建议或解释。如果是代码,请提供代码分析和改进建议;如果是配置文件,请检查配置并提供优化建议;如果是文档,请总结要点并提供相关建议:"
# exec命令处理提示词 - 当用户通过SSH exec执行命令时使用
# 这段内容将会附加在用户的消息之前。比如[{role:system,content:system_prompt}, { role: user, content: exec_prompt + '\n\n' + user_input }]
exec_prompt: ""
# exec_prompt: "你是一个专业的中英互译专家!请根据用户输入的内容,进行对应的翻译!比如用户如果输入的是中文,则翻译成英文;反之亦然;请保持翻译原意以及语法的准确性!只需要回复翻译的结果,不要回复任何备注等无关信息"
# MCP (Model Context Protocol) 配置
mcp:
enabled: false # 是否启用MCP功能
refresh_interval: 300 # 工具列表刷新间隔(秒),默认5分钟
servers: # MCP服务器列表
# 示例:stdio传输方式的MCP服务器
- name: "filesystem"
transport: "stdio"
command: ["mcp-server-filesystem", "/path/to/allowed/directory"]
enabled: false
- name: "bing"
transport: "stdio"
command: ["npx", "bing-cn-mcp"]
enabled: true
- name: "time"
transport: "stdio"
command: ["uvx", "mcp-server-time"]
enabled: true
- name: "fetch"
transport: "stdio"
command: ["uvx", "mcp-server-fetch"]
enabled: true
# 示例:HTTP传输方式的MCP服务器
- name: "web-search"
transport: "http"
url: "http://localhost:8080/mcp"
headers:
Authorization: "Bearer your-token-here"
Content-Type: "application/json"
enabled: false
# 示例:SSE传输方式的MCP服务器
- name: "database"
transport: "sse"
url: "http://localhost:9000/mcp/sse"
headers:
X-API-Key: "your-api-key"
enabled: false