
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This repository packages the Ambient Form workflow as:
textbackend/ Python CLI + FastAPI service frontend/ Vite + React UI examples/ Example PDF and transcript .agents/skills/ Repo-scoped Codex skill AGENTS.md Repo instructions for Codex pyproject.toml Python project definition for uv
uv for Python environment managementOPENAI_API_KEY for model-based extraction| Variable | Default | Purpose |
|---|---|---|
OPENAI_API_KEY | — | Enables model-based field extraction |
DEBUG | false | Set to true for debug-level logging |
CORS_ALLOW_ORIGINS | * | Comma-separated allowed origins |
CORS_ALLOW_CREDENTIALS | false | Allow cookies/auth headers cross-origin |
AMBIENTFORM_CACHE_DIR | system temp | Upload cache directory |
FRONTEND_DIST_DIR | frontend/dist | Path to the compiled frontend |
MAX_PDF_BYTES | 20971520 | Maximum accepted PDF size (bytes) |
MAX_PDF_PAGES | (set in code) | Maximum pages per PDF |
UPLOAD_ID_SIGNING_SECRET | — | HMAC secret for upload ID signing |
bashuv sync --dev
Run the CLI:
bashuv run python backend/pdf_schema_extract_fill.py \ --pdf examples/Bilan_Prevention_45.pdf \ --text "examples/michael interview.txt"
Run the API server:
bashuv run python backend/pdf_schema_extract_fill.py serve --host 0.0.0.0 --port 8000
bashcd frontend npm install npm run dev
The Vite dev server proxies all /api requests to the backend at http://localhost:8000,
so no environment variables are needed. Start the backend first, then the frontend.
The repository includes a multi-stage Docker setup where:
frontend is built with Vite during image build — no build-time environment variables requiredfrontend/disthttp://localhost:8000/api/…), so the image is host-agnosticCORS is open (*) by default. To restrict to specific origins, set CORS_ALLOW_ORIGINS at
runtime (see docker-compose.yml for the commented example).
Build and run:
bashdocker compose up --build
bashdocker compose build
bashdocker compose up -d
bashcurl http://localhost:8000/api/health
http://localhost:8000http://localhost:8000/docsbashdocker compose logs -f ambientform
bashdocker compose down
Then open:
http://localhost:8000http://localhost:8000/api/healthPersistent data:
./data on host is mounted to /app/data in containerupload_id) are stored under /app/data/cacheRun backend CLI inside the container:
bashdocker compose run --rm ambientform \ /app/.venv/bin/python backend/pdf_schema_extract_fill.py \ --pdf examples/Bilan_Prevention_45.pdf \ --text "examples/michael interview.txt"
The frontend uses react-pdf backed by PDF.js. The PDF.js worker is bundled from
pdfjs-dist at build time and served as a local asset — no external CDN requests
are made at runtime.
The form preview supports:
/api/forms/fillThis repository is prepared for Codex-driven production work:
AGENTS.md contains repository instructions for Codex.agents/skills/bilan-prevention/SKILL.md gives Codex workflow-specific guidanceRecommended Codex work sequence:
bashcodex "Review backend request and response contracts and suggest cleanup before production" codex "Add frontend integration tests for schema upload, extraction, preview, and export" codex "Improve local extraction rules for real-world French interviews" codex "Refactor App.jsx into components while keeping pdf.js preview working"
/api/forms/fill route using upload_id returned by /api/forms/schema.react-pdf) with a self-hosted worker — no iframe embedding, no external CDN dependency.您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务