Files
memoryweave/.github/workflows/ci.yml
xiaowei 2a350cf781 fix(distill): max_tokens 800→1200 — Agnes推理token预算不足
Agnes 2.0-flash是推理模型,推理token占大量预算。
800仍不够→JSON截断(parse error: unexpected end of JSON input)。
1200确保推理+正文都够用。
2026-08-20 01:13:06 +08:00

52 lines
1.5 KiB
YAML

# 织忆 MemoryWeave — CI/CD Pipeline (简化版)
# 可在 GitHub Actions / Gitee CI / cron 中使用
name: 织忆 CI/CD 自动评估
on:
push:
branches: [main]
schedule:
- cron: '0 9 * * *' # 每天 9:00 UTC
jobs:
eval:
runs-on: self-hosted
steps:
- name: 健康检查
run: |
curl -sf http://localhost:7821/health || exit 1
- name: 运行评估
run: |
RESULT=$(curl -s -X POST http://localhost:7821/api/v1/eval/run \
-H "Content-Type: application/json" \
-H "X-API-Key: ${{ secrets.ZHIYI_API_KEY }}" \
-d '{"queries":[]}')
echo "$RESULT" | jq .
- name: 退化检测
run: |
TREND=$(curl -s http://localhost:7821/api/v1/eval/history \
-H "X-API-Key: ${{ secrets.ZHIYI_API_KEY }}" | jq -r '.trend')
if [ "$TREND" = "degrading" ]; then
echo "⚠️ Eval degradation detected! Check eval history."
exit 1
fi
echo "✅ Eval trend: $TREND"
- name: 统计
run: |
curl -s http://localhost:7821/api/v1/stats \
-H "X-API-Key: ${{ secrets.ZHIYI_API_KEY }}" | jq '{total_memories, total_episodes, conflicts_pending}'
backup:
runs-on: self-hosted
needs: eval
if: github.event_name == 'schedule'
steps:
- name: 触发备份
run: |
curl -s -X POST http://localhost:7821/api/v1/admin/backup \
-H "X-API-Key: ${{ secrets.ZHIYI_API_KEY }}"