docs(harness): import the Gateway app from the module that defines it (#6169)

Both the en and zh integration guides show `from deerflow.app.gateway.main import
app`, but there is no deerflow.app package and no gateway/main.py in the tree: the
FastAPI instance is created by create_app() and bound at module level in
backend/app/gateway/app.py, which is also how backend/AGENTS.md documents it.

The copy-pasteable snippet now names that module, so mounting the Gateway as a
sub-application works from the documented import instead of failing at runtime.
This commit is contained in:
lihongyuan99 2026-10-02 17:08:30 +08:00 committed by GitHub
parent 63e399f2bd
commit 571a7e40e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ from fastapi import FastAPI
app = FastAPI()
# Mount the DeerFlow gateway router
from deerflow.app.gateway.main import app as gateway_app
from app.gateway.app import app as gateway_app
app.mount("/deerflow", gateway_app)
```

View File

@ -107,7 +107,7 @@ from fastapi import FastAPI
app = FastAPI()
# 挂载 DeerFlow Gateway
from deerflow.app.gateway.main import app as gateway_app
from app.gateway.app import app as gateway_app
app.mount("/deerflow", gateway_app)
```