ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s

This commit is contained in:
2026-08-20 13:12:50 +00:00
commit b119135836
10275 changed files with 3284984 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Provider: openai (default), dashscope/qwen/bailian, or openrouter
LLM_PROVIDER=openai
# OpenAI 配置
OPENAI_API_KEY=your_openai_api_key_here
# Alibaba Cloud Model Studio / Bailian (Qwen)
# DASHSCOPE_API_KEY=your_dashscope_api_key_here
# DASHSCOPE_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1
# 模型(默认 gpt-4o-mini):本实验特意用这个较弱、"故意可被攻破"的基线,
# 才能展示"防御逐层加强 -> 注入成功率下降"的对照曲线;换更强的模型(如 gpt-5.6-luna
# 会在 D1 无防御下就抗住全部注入,抹平教学对比。
OPENAI_MODEL=gpt-4o-mini
# 可选:自定义 API base_url(默认官方;请勿指向已失效的第三方网关)
# OPENAI_BASE_URL=
# 通用回退:未设置 OPENAI_API_KEY 时,若配置了 OPENROUTER_API_KEY,则自动改走
# OpenRoutergpt-* 会映射为 openai/…)。
# OPENROUTER_API_KEY=your-openrouter-api-key
# 可选:每个 攻击x防御 组合的试验次数(建议 3-5,控制成本)
TRIALS=4