feat(AI服务):lpt-ai 独立服务初始版本
- Fastify + TypeScript,OpenAI 兼容接口对接 SiliconFlow - POST /ai/aggregate-report:残片聚合为学习报告(支持预期对比) - POST /ai/generate-mind-map:生成思维导图缩进大纲(与后端解析格式一致) - Key 从环境变量读取且日志脱敏,未配置时返回 503 由调用方降级 - prompt 模板集中管理,vitest 单元测试
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# LLM 提供商配置(SiliconFlow OpenAI 兼容接口)
|
||||
LLM_API_URL=https://api.siliconflow.cn/v1/chat/completions
|
||||
# API Key(必填,未配置时服务返回 503)
|
||||
LLM_API_KEY=
|
||||
# 模型名(32B 级别即可满足残片聚合需求)
|
||||
LLM_MODEL=Qwen/Qwen2.5-32B-Instruct
|
||||
# 请求超时(毫秒)
|
||||
LLM_TIMEOUT_MS=60000
|
||||
|
||||
# 服务端口
|
||||
PORT=5199
|
||||
Reference in New Issue
Block a user