Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# AI服务配置
SSLOGS_AI_API_KEY=your_api_key_here
# cloud_provider 可选:deepseek、custom(任意 OpenAI 兼容端点)或 zhipu(智谱 GLM,支持 GLM Coding Plan)
SSLOGS_AI_CLOUD_PROVIDER=deepseek
SSLOGS_AI_LOCAL_PROVIDER=ollama
SSLOGS_AI_TYPE=cloud
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ coverage.xml
api_keys.txt
secrets.json
private_config.yaml
# config.yaml 含本地真实 API Key(如智谱),不提交;从 config.example.yaml 复制生成
config.yaml

# MaxMind GeoIP configuration with real credentials
config/GeoIP.conf.local
Expand Down
29 changes: 29 additions & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ ai_analysis:
ai:
type: cloud
local_provider: ollama
# cloud_provider 可选:deepseek(读 deepseek: 段)、custom(读 custom: 段,任意 OpenAI 兼容端点)、
# 或 zhipu(读 zhipu: 段,智谱 GLM;支持 GLM Coding Plan 编程套餐端点)
cloud_provider: deepseek
max_retries: 3
retry_delay: 1
Expand All @@ -93,6 +95,33 @@ ollama:
base_url: http://localhost:11434/api/chat
timeout: 60

# 自定义 OpenAI 兼容端点配置
# 当 ai.cloud_provider 设置为 custom 时启用,可指向任意 OpenAI 兼容 API
# (OpenAI / 通义千问 / Moonshot / SiliconFlow 自选模型 / 自建 vLLM / Ollama 的 OpenAI 兼容口 等)。
#
# base_url 为 OpenAI 兼容的 base 地址(通常以 /v1 结尾,无需包含 /chat/completions)。
# api_key 建议留空并使用环境变量:export SSLOGS_AI_API_KEY="your-actual-api-key"
custom:
base_url: https://api.openai.com/v1 # 例:https://api.openai.com/v1 或 http://localhost:11434/v1
api_key: "" # 留空则读取环境变量 SSLOGS_AI_API_KEY
model: gpt-4o-mini # 任意模型名,可在 GUI 中从 /models 拉取
timeout: 30
max_tokens: 2048

# 智谱 GLM 配置(当 ai.cloud_provider 设置为 zhipu 时启用)
# 智谱提供 OpenAI 兼容端点,国内直连。base_url 留空时按 coding_plan 自动派生:
# coding_plan=false -> https://open.bigmodel.cn/api/paas/v4 (标准按量计费 API)
# coding_plan=true -> https://open.bigmodel.cn/api/coding/paas/v4(GLM Coding Plan 编程套餐)
# api_key 建议留空并使用环境变量:export SSLOGS_AI_API_KEY="your-zhipu-api-key"
# 模型可选:glm-4.6 / glm-4.5 / glm-4-plus / glm-4-flash / glm-4.7-FlashX / glm-5.2 等
zhipu:
base_url: "" # 留空则按 coding_plan 派生默认端点
api_key: "" # 留空则读取环境变量 SSLOGS_AI_API_KEY
model: glm-4.6
coding_plan: false # 开启后走 GLM Coding Plan 专属端点(与套餐 Key 配合)
timeout: 120 # GLM-5 等推理模型较慢,需要更长超时
max_tokens: 4096 # GLM-5 等推理模型需要更大空间

# LM Studio 配置 (v3.1新增)
lm_studio:
base_url: http://localhost:1234/v1/chat/completions
Expand Down
164 changes: 0 additions & 164 deletions config.yaml

This file was deleted.

Loading