当前位置:首页>python>langserve ——从前端视角学 Python langchain 系列

langserve ——从前端视角学 Python langchain 系列

  • 2026-01-20 18:48:16
langserve ——从前端视角学 Python langchain 系列

什么是 langserve

LangServe[1] 帮助开发者将 LangChain 的 runnables 和 chains[2] 部署为 REST API。该库与 FastAPI[3] 集成,并使用 pydantic[4] 进行数据验证。

此外,它还提供了一个客户端,可用于调用部署在服务器上的 runnables。LangChain.js[5] 中提供了 JavaScript 客户端。

功能特性[6]

  • • 全部采用经过实战检验的开源 Python 库构建,如 FastAPI、Pydantic、uvloop 和 asyncio
  • • 自动生成高效的 /invoke/batch 和 /stream 端点,支持单台服务器上的大量并发请求
  • • 位于 /playground/ 的 Playground 页面,支持流式输出和中间步骤显示
  • • /stream_log 端点用于流式传输来自您的链/代理的所有(或部分)中间步骤
  • • 自 0.0.40 版本起 新增 支持 /stream_events,使得流式传输更便捷,无需解析 /stream_log 的输出
  • • 使用客户端 SDK 调用 LangServe 服务器,就如同调用本地运行的 Runnable 一样(或直接调用 HTTP API)
  • • 输入和输出 schema 自动从 LangChain 对象推断,并在每次 API 调用时强制执行,提供丰富的错误信息
  • • API 文档页面包含 JSONSchema 和 Swagger(可插入示例链接)
  • • 内置 trace LangSmith[7],只需添加您的 API 密钥(参见 使用说明[8]

总结就是 langserve 将大模型应用部署到 FastAPI,自动暴露成流式对话接口,开箱即用,类似 express + openapi + zod(当然目前 Node.js 是没有对标产品的)。

创建 langserve 应用

这就是本文的罪恶起点 🧗‍♂️:langserve 的官方文档 https://github.com/langchain-ai/langserve#installation 本文将经历九九八十一难 🤣。

langchain app new my-app

这个命令等价于

❯ uvx langchain-cli app new my-app
# 类似 npm create vite

输出

What package would you like to add? (leave blank to skip):


Success
! Created a new LangChain app under "./my-app"!


Next
, enter your new app directory by running:

    cd ./my-app

Then
 add templates with commands like:

    langchain app add extraction-openai-functions
    langchain app add git+ssh://git@github.com/efriis/simple-pirate.git

uv sync 安装依赖,报错“error: No project table found in: pyproject.toml”,原因:cli 默认输出 pyproject.toml 为 poetry 需要转成 uv 支持的格式:

pyproject.toml:

[project]
name
 = "my-app"
version
 = "0.1.0"
description
 = ""
authors
 = [{name = "Your Name", email = "you@example.com"}]
readme
 = "README.md"
requires-python
 = ">=3.11"
dependencies
 = [
    "uvicorn>=0.23.2"
,
    "langserve[server]>=0.0.30"
,
    "pydantic<2"
,
]

[project.optional-dependencies]

dev
 = [
    "langchain-cli>=0.0.15"
,
]

[build-system]

requires
 = ["hatchling"]
build-backend
 = "hatchling.build"

如果再次执行报错:

❯ uv sync
Resolved 52 packages in 1ms
  × Failed to download `tenacity==8.5.0`
  ├─▶ Failed to fetch:
  │   `https://pypi.tuna.tsinghua.edu.cn/packages/d2/3f/8ba87d9e287b9d385a02a7114ddcef61b26f86411e121c9003eb509a1773/tenacity-8.5.0-py3-none-any.whl`
  ╰─▶ HTTP status client error (403 Forbidden) for url
      (https://pypi.tuna.tsinghua.edu.cn/packages/d2/3f/8ba87d9e287b9d385a02a7114ddcef61b26f86411e121c9003eb509a1773/tenacity-8.5.0-py3-none-any.whl)

换有这个版本的镜像源 ❯ code ~/.config/uv/uv.toml

[[index]]
+ name = "tencent"

+ url = "https://mirrors.cloud.tencent.com/pypi/simple/"

- url = "https://pypi.tuna.tsinghua.edu.cn/simple"

default = true

https://uv.oaix.tech/blog/2025/06/17/quickly-set-uv-package-index-is-china-mirror/#1-pyprojecttoml

uv sync 继续报错

ValueError: Unable to determine which files to ship inside the wheel using the following heuristics:
https
://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection

The
 most likely cause of this is that there is no directory that matches the name of your project (my_app).

At
 least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see:
https
://hatch.pypa.io/latest/config/build/

As
 an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of
your project, you can define the following:

[tool.hatch.build.targets.wheel]
packages = ["src/foo"]

解决:pyproject.toml

[tool.hatch.build.targets.wheel]
packages
 = ["my-app"]  

这回成功了

❯ uv sync
Resolved
 52 packages in 1ms
Audited
 37 packages in 0.27ms

运行项目

REAMDE 说

langchain serve

但我们需要通过 uvx 运行,因为 langchain 不是全局命令。

方式 1:uvx langchain-cli serve

但是每次运行 ❯ uvx langchain-cli serve 都会重新安装 langchain-cli 且命令长,如何避免?

解法:

uvx 就是“每次临时安装、跑完即丢”,所以必然会重新拉包。
想要“装一次、以后秒启”,改用 uv tool install 把它装进隔离的 全局工具环境即可:

  1. 1. 一次性安装
uv tool install langchain-cli
  1. 2. 以后随便用
langchain-cli serve   # 直接当普通命令用,无需再前置 uvx

uv 会在 $HOME/.local/bin(Linux/macOS)或 %APPDATA%\uv\bin(Windows)里放一个可执行文件,并自动帮你把该目录加进 PATH。
以后无论在哪,直接 langchain-cli serve 都是秒启动,不会再下载。

我们试试 ❯ langchain --version 输出

langchain-cli 0.0.37

说明被全局安装了,这非我所愿!我们需要一个类似 npm 安装在项目内然后 npx foo-cli。除了『全局污染』后面还有讲到全局安装会踩其他坑,具体解决方案随后也会讲到。

因为 uv 安装之初就自动写了 $HOME/.local/bin 需要当做全局命令使用。

# add uv to path using export is more fast than `source`
export
 PATH=$HOME/.local/bin:$PATH

langchain server 运行报错

langchain serve 或 uv run langchain serve

❯ langchain serve
INFO
:     Will watch for changes in these directories: ['F:\\workspace\\github\\my-app']
INFO
:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO
:     Started reloader process [23700] using StatReload


TypeError
: Expected a Runnable, got <class 'NotImplementedType'>. The second argument to add_routes should be a Runnable instance.add_route(app, runnable, ...) is the correct usage.Please make sure that you are using a runnable which is an instance of langchain_core.runnables.Runnable.

原因在  app/server.py line 14

add_routes(app, NotImplemented)

好的现在我们改成自己的模型

# Edit this to add the chain you want to add
add_routes(
    app,
    chatModel,
    path="/openai",
)

❯ uv run langchain serve 报错 ModuleNotFoundError: No module named 'dotenv' 或 ModuleNotFoundError: No module named 'langchain_openai' 但是明明项目里已安装这两模块。

uv run langchain serve

INFO:     Will watch for changes in these directories: ['F:\\workspace\\github\\my-app']
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [22924] using StatReload


  File "F:\workspace\github\my-app\app\server.py", line 5, in <module>
    from
 .lib.models import chatModel
  File "F:\workspace\github\my-app\app\lib\models.py", line 4, in <module>
    from
 dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'
INFO:     Stopping reloader process [22924]

app/lib/models.py 如下:

from dotenv import load_dotenv
from
 langchain_openai import ChatOpenAI
from
 pydantic import SecretStr

这是因为我们的 langchain-cli 是全局安装的!
❯ uv tool install langchain-cli,核心原因是 python-dotenv 包没有安装在 langchain-cli 命令所使用的那个 Python 环境中。全局当然无 dotenv 和 langchain_openai

解法
  1. 1. 卸载全局包
❯ uv tool uninstall langchain-cli
Uninstalled
 2 executables: langchain-cli.exe, langchain.exe
❯ langchain --version
zsh: command not found: langchain

说明卸载成功。

  1. 2. 将 langchain cli 安装到当前项目

如果 pyproject.toml 已经有了,直接 uv sync 即可,否则 uv add langchain-cli --dev,前端同学是不是特别熟悉,等价于 npm i -D foo 或 pnpm add -D foo

[project.optional-dependencies]
dev
 = [
    "langchain-cli>=0.0.15"
,
]
❯ uv run langchain --version
langchain-cli 0.0.37

说明当前项目安装成功!

ImportError: cannot import name 'VerifyTypes' from 'httpx._types'

❯ uv run langchain serve    

报错:

ImportError: cannot import name 'VerifyTypes' from 'httpx._types' (F:\workspace\github\my-app\.venv\Lib\site-packages\httpx\_types.py)
解法

ImportError: cannot import name 'VerifyTypes' from 'httpx._types' #796[9] 说 uv install httpx==0.27.2

即定死版本号,但是这样肯定对于一个新项目是的维护性是大打折扣的。我们最好还是通过升级 langchain-cli 或 langserve 来解决。

langchain-cli 已是最新,langserve 升级就没那么简单了,我在这里查询了大量文档做了多次尝试。

首先我们回到 uvx langchain-cli app new my-app 生成的 pyproject.toml

requires-python = ">=3.11"
dependencies
 = [
    "uvicorn>=0.23.2"
,
    "langserve[server]>=0.0.30"
,
    "pydantic<2"
,
]

尝试 1

❯ uv add -U 'langserve[server]',但 langserve 安装 0.2.3 而非我们预期的最新 0.3.3(2025-12-23)。

怎么看最新版本:https://pypi.org/project/langserve/

pypi.org 类似 npmjs.com

-U 类似 npm i foo@latest

尝试 2

uv add 'langserve[server]==0.3.3' 类似 npm 写死版本号。

❯ uv add 'langserve[server]==0.3.3'

× No solution found when resolving dependencies for split (python_full_version >= '3.12.4'): 
╰─▶ Because langserve==0.3.3 depends on pydantic>=2.7,<3.0 and your project depends on langserve[server]==0.3.3, we can conclude
  that your project depends on pydantic>=2.7,<3.0.
  And because your project depends on pydantic<2 and your project requires my-app[dev], we can conclude that your project's
  requirements are unsatisfiable.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.

终于有点眉目了。

说明我们需要先升级 pydantic。

  1. 1. uv remove pydantic && uv add -U pydantic
  2. 2. uv remove 'langserve[server]' && uv add -U 'langserve[server]'

运行成功

终于运行成功了 🎉,太不容易了尤其是从前端转来的 Python 新手!

❯ uv run langchain serve
INFO
:     Will watch for changes in these directories: ['F:\\workspace\\github\\my-app']
INFO
:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO
:     Started reloader process [1860] using StatReload
SecretStr
(api_key)=SecretStr('**********')
base_url='https://ark.cn-beijing.volces.com/api/v3'
API
 Key 已成功加载
INFO
:     Started server process [20556]
INFO
:     Waiting for application startup.

     __          ___      .__   __.   _______      _______. _______ .______     ____    ____  _______
    |  |        /   \     |  \ |  |  /  _____|    /       ||   ____||   _  \    \   \  /   / |   ____|
    |  |       /  ^  \    |   \|  | |  |  __     |   (----`|  |__   |  |_)  |    \   \/   /  |  |__
    |  |      /  /_\  \   |  . `  | |  | |_ |     \   \    |   __|  |      /      \      /   |   __|
    |  `
----./  _____  \  |  |\   | |  |__| | .----)   |   |  |____ |  |\  \----.  \    /    |  |____
    |_______/__/     \__\ |__| \__|  \______| |_______/    |_______|| _| `._____|   \__/     |_______|

LANGSERVE: Playground for chain "/openai/" is live at:
LANGSERVE:  │
LANGSERVE:  └──> /openai/playground/
LANGSERVE:
LANGSERVE: See all available routes at /docs/
INFO:     Application startup complete.

完整代码见 github[10]

最后再来解决一个编辑器类型问题,当我们将代码从 VSCode 打开换成 Trae,却发现:

Trae 导入三方包类型全部是 Any

翻阅资料发现是 Trae 没有 pylance 插件导致的,社区也有历史反馈 Pylance not available #38[11],说使用 BasePyright 或 Pyright,但是都不好使。死马当活马医,试试 uv 公司新出的 ty,trae 内搜索居然有,而且安装后一切正常了!我也在 GitHub issue 留言了『自己淋过雨希望给他人撑把伞[12]』。

引用链接

[1] LangServe: https://github.com/langchain-ai/langserve
[2] runnables 和 chains: https://python.langchain.com/docs/expression_language/
[3] FastAPI: https://fastapi.tiangolo.com/
[4] pydantic: https://docs.pydantic.dev/latest/
[5] LangChain.js: https://js.langchain.com/docs/ecosystem/langserve
[6] 功能特性: https://github.com/langchain-ai/langserve#features
[7] LangSmith: https://www.langchain.com/langsmith
[8] 使用说明: https://docs.smith.langchain.com/
[9] ImportError: cannot import name 'VerifyTypes' from 'httpx._types' #796https://github.com/langchain-ai/langserve/issues/796
[10] github: https://github.com/legend80s/youtube-video-article-generator-python
[11] 历史反馈 Pylance not available #38https://github.com/Trae-AI/Trae/issues/38
[12] 自己淋过雨希望给他人撑把伞: https://bgithub.xyz/Trae-AI/Trae/issues/38#issuecomment-3688761693

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 15:25:18 HTTP/2.0 GET : https://f.mffb.com.cn/a/464038.html
  2. 运行时间 : 0.214747s [ 吞吐率:4.66req/s ] 内存消耗:4,688.24kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=bd4d2557dc7c92937866fec38f2f4662
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001001s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001532s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.006369s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.003763s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001323s ]
  6. SELECT * FROM `set` [ RunTime:0.005651s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001505s ]
  8. SELECT * FROM `article` WHERE `id` = 464038 LIMIT 1 [ RunTime:0.015165s ]
  9. UPDATE `article` SET `lasttime` = 1770535518 WHERE `id` = 464038 [ RunTime:0.016089s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.003097s ]
  11. SELECT * FROM `article` WHERE `id` < 464038 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.002338s ]
  12. SELECT * FROM `article` WHERE `id` > 464038 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.006150s ]
  13. SELECT * FROM `article` WHERE `id` < 464038 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.047009s ]
  14. SELECT * FROM `article` WHERE `id` < 464038 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.009569s ]
  15. SELECT * FROM `article` WHERE `id` < 464038 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.007058s ]
0.218847s