当前位置:首页>学习笔记>LangGraph 学习笔记(二)

LangGraph 学习笔记(二)

  • 2026-02-03 12:49:39
LangGraph 学习笔记(二)

当你使用 LangGraph 构建 Agent 时,你首先需要将其拆分为多个步骤,这个步骤称为节点(nodes)。然后你要描述

每个节点之间的决策和过渡。最终链接每个节点的是一个共享的 state,每个节点可以往这里写和读。

这篇文章中,我将带你使用 langgraph 过一遍构建客户支持 email agent 的思路过程。

想要从你自动化的流程开始

想像一下你需要构建一个处理客户支持邮件的 AI Agent。你的产品团队有以下要求。

The agent should:Read incoming customer emailsClassify them by urgency and topicSearch relevant documentation to answer questionsDraft appropriate responsesEscalate complex issues to human agentsSchedule follow-ups when neededExample scenarios to handle:1. Simple product question: "How do I reset my password?"2. Bug report: "The export feature crashes when I select PDF format"3. Urgent billing issue: "I was charged twice for my subscription!"4. Feature request: "Can you add dark mode to the mobile app?"5. Complex technical issue: "Our API integration fails intermittently with 504 errors"

第一步:将你的工作流分为不同的步骤

每个步骤都是一个 node(或者是做一个具体工作的函数)。然后将它们之间的关系联系起来。这里可以理解为流程图。

第二步:识别出每一步都需要做什么

对于图中的每个节点,确定它代表什么类型的操作以及它需要什么上下文才能正常工作。

一共有四种,LLM 步、Data 步、Action 步、用户输入步。

LLM steps

当一个步骤中需要理解、分析、生成文本、做决策时:

  1. Classify intent:

    1. 静态上下文 prompt:分类类别,紧迫性定义,回复格式
    2. 动态上下文:Email 内容,发送者信息
    3. 期望结果:决定路由的结构化分类
  2. Draft reply:

    1. 静态上下文:语调指南、公司政策、回复模板
    2. 动态上下文:分类结果、搜索结果、用户历史
    3. 期望结果:可供审核的专业电子邮件回复

Data Steps

当一个步骤中需要获取外部信息:

  1. Document search

    1. 参数:根据意图和主体构建的查询
    2. 重试策略
    3. 缓存:存储常用的查询以减少 API 调用次数
  2. Customer history lookup

    1. 参数:从 state 中获取客户邮件和 ID
    2. 重试策略
    3. 缓存

Action Steps

当一个步骤中需要执行外部动作时:

  1. Send Reply

    1. 执行时机:批准后(由人或者自动)
    2. 重试策略
    3. 是否缓存:每次发送都是独一无二的动作
  2. Bug Track:

    1. 执行时机:意图是 bug 的时候
    2. 重试策略:是的,关键是不要都是 bug 报告
    3. 返回:将 Ticket ID 包含到回复邮件中

User Input steps

当一个步骤中需要人类介入时,

  1. Human review node:
    1. 决定参考上下文:原始邮件、草稿回复、紧急度、分类
    2. 预期输入类型:审核通过与否以及可选的编辑回复
    3. 触发时机:高紧急度、复杂问题、质量问题

第三步:设计你的状态

State 是可以被你的 agent 所有 node 访问的共享内存。可以把它看做成你的智能体在处理流程的时候用来记录它所学到的一切以及所做决定的笔记本。

什么应该在 state 中?

应该存:如果它需要在各个 steps 中保持不变就将其放到 state 中

不该存:临时要用的

对于我们的邮件 agent 来说,我们需要存的有:

  • 原始邮件内容,发送人信息
  • 分类结果
  • 搜索结果和客户数据
  • 草稿回复
  • 执行 metadata(debug 使用)

保持原始数据,按需格式化 promtps

关键原则:你的 state 应该保存原始数据,不是格式化后的文本。在你需要的时候再格式化 prompts

这里的意思是:

  • 不同的节点可以根据自身需求对相同的数据进行不同的格式化处理
  • 你可以更改提示模板,而无需修改你的状态架构
  • 调试更加清晰——你能确切地看到每个节点收到了哪些数据
  • 你的智能体可以在不破坏现有状态的情况下进行演进

我们来定义我们的 state:

from typing import TypedDict, Literal# Define the structure for email classificationclassEmailClassification(TypedDict):    intent: Literal["question""bug""billing""feature""complex"]    urgency: Literal["low""medium""high""critical"]    topic: str    summary: strclassEmailAgentState(TypedDict):# Raw email data    email_content: str    sender_email: str    email_id: str# Classification result    classification: EmailClassification | None# Raw search/API results    search_results: list[str] | None# List of raw document chunks    customer_history: dict | None# Raw customer data from CRM# Generated content    draft_response: str | None    messages: list[str] | None

第四步:构建你的节点

现在我们来实现每个步骤。在 Langgraph 中每个 node 仅仅是一个 python 函数,这个函数输入是当前的 state 输出是更新 state

适当地处理错误

不同错误有不同的处理策略。

瞬时错误

添加一个重试策略自动重试网路问题

from langgraph.types import RetryPolicyworkflow.add_node("search_documentation",    search_documentation,    retry_policy=RetryPolicy(max_attempts=3, initial_interval=1.0))

LLM 可恢复错误

存储发生的错误并让 LLM 可见再次尝试,这里比较有意思的是,Command 作用可以同时完成状态更新以及控制流流转。

from langgraph.types import Commanddefexecute_tool(state: State) -> Command[Literal["agent", "execute_tool"]]:try:        result = run_tool(state['tool_call'])return Command(update={"tool_result": result}, goto="agent")except ToolError as e:# Let the LLM see what went wrong and try againreturn Command(            update={"tool_result"f"Tool error: {str(e)}"},            goto="agent"        )

用户可修复错误

缺少信息、指令不清晰等。

from langgraph.types import Commanddeflookup_customer_history(state: State) -> Command[Literal["draft_response"]]:ifnot state.get('customer_id'):        user_input = interrupt({"message""Customer ID needed","request""Please provide the customer's account ID to look up their subscription history"        })return Command(            update={"customer_id": user_input['customer_id']},            goto="lookup_customer_history"        )# Now proceed with the lookup    customer_data = fetch_customer_history(state['customer_id'])return Command(update={"customer_history": customer_data}, goto="draft_response")

意外错误

defsend_reply(state: EmailAgentState):try:        email_service.send(state["draft_response"])except Exception:raise# Surface unexpected errors

实现我们邮件 Agent Nodes

读取和分类节点

  • LangGraph 封装的 ChatOpenAI 拥有结构化输出方法,可以直接取用结构化的结果
from typing import Literalfrom langgraph.graph import StateGraph, START, ENDfrom langgraph.types import interrupt, Command, RetryPolicyfrom langchain_openai import ChatOpenAIfrom langchain.messages import HumanMessagellm = ChatOpenAI(model="gpt-5-nano")defread_email(state: EmailAgentState) -> dict:"""Extract and parse email content"""# In production, this would connect to your email servicereturn {"messages": [HumanMessage(content=f"Processing email: {state['email_content']}")]    }defclassify_intent(state: EmailAgentState) -> Command[Literal["search_documentation", "human_review", "draft_response", "bug_tracking"]]:"""Use LLM to classify email intent and urgency, then route accordingly"""# Create structured LLM that returns EmailClassification dict    structured_llm = llm.with_structured_output(EmailClassification)# Format the prompt on-demand, not stored in state    classification_prompt = f"""    Analyze this customer email and classify it:    Email: {state['email_content']}    From: {state['sender_email']}    Provide classification including intent, urgency, topic, and summary.    """# Get structured response directly as dict    classification = structured_llm.invoke(classification_prompt)# Determine next node based on classificationif classification['intent'] == 'billing'or classification['urgency'] == 'critical':        goto = "human_review"elif classification['intent'in ['question''feature']:        goto = "search_documentation"elif classification['intent'] == 'bug':        goto = "bug_tracking"else:        goto = "draft_response"# Store classification as a single dict in statereturn Command(        update={"classification": classification},        goto=goto    )

搜索和跟踪节点

defsearch_documentation(state: EmailAgentState) -> Command[Literal["draft_response"]]:"""Search knowledge base for relevant information"""# Build search query from classification    classification = state.get('classification', {})    query = f"{classification.get('intent''')}{classification.get('topic''')}"try:# Implement your search logic here# Store raw search results, not formatted text        search_results = ["Reset password via Settings > Security > Change Password","Password must be at least 12 characters","Include uppercase, lowercase, numbers, and symbols"        ]except SearchAPIError as e:# For recoverable search errors, store error and continue        search_results = [f"Search temporarily unavailable: {str(e)}"]return Command(        update={"search_results": search_results},  # Store raw results or error        goto="draft_response"    )defbug_tracking(state: EmailAgentState) -> Command[Literal["draft_response"]]:"""Create or update bug tracking ticket"""# Create ticket in your bug tracking system    ticket_id = "BUG-12345"# Would be created via APIreturn Command(        update={"search_results": [f"Bug ticket {ticket_id} created"],"current_step""bug_tracked"        },        goto="draft_response"    )

回复节点

  • 如果遇到中断了,那么仅执行中断函数,其余之前的节点不再执行,这个需要和 memory 做配合,这个会将状态保存下来以等待人类审批之后在执行。
defdraft_response(state: EmailAgentState) -> Command[Literal["human_review", "send_reply"]]:"""Generate response using context and route based on quality"""    classification = state.get('classification', {})# Format context from raw state data on-demand    context_sections = []if state.get('search_results'):# Format search results for the prompt        formatted_docs = "\n".join([f"- {doc}"for doc in state['search_results']])        context_sections.append(f"Relevant documentation:\n{formatted_docs}")if state.get('customer_history'):# Format customer data for the prompt        context_sections.append(f"Customer tier: {state['customer_history'].get('tier''standard')}")# Build the prompt with formatted context    draft_prompt = f"""    Draft a response to this customer email:{state['email_content']}    Email intent: {classification.get('intent''unknown')}    Urgency level: {classification.get('urgency''medium')}{chr(10).join(context_sections)}    Guidelines:    - Be professional and helpful    - Address their specific concern    - Use the provided documentation when relevant    """    response = llm.invoke(draft_prompt)# Determine if human review needed based on urgency and intent    needs_review = (        classification.get('urgency'in ['high''critical'or        classification.get('intent') == 'complex'    )# Route to appropriate next node    goto = "human_review"if needs_review else"send_reply"return Command(        update={"draft_response": response.content},  # Store only the raw response        goto=goto    )defhuman_review(state: EmailAgentState) -> Command[Literal["send_reply", END]]:"""Pause for human review using interrupt and route based on decision"""    classification = state.get('classification', {})# interrupt() must come first - any code before it will re-run on resume    human_decision = interrupt({"email_id": state.get('email_id',''),"original_email": state.get('email_content',''),"draft_response": state.get('draft_response',''),"urgency": classification.get('urgency'),"intent": classification.get('intent'),"action""Please review and approve/edit this response"    })# Now process the human's decisionif human_decision.get("approved"):return Command(            update={"draft_response": human_decision.get("edited_response", state.get('draft_response',''))},            goto="send_reply"        )else:# Rejection means human will handle directlyreturn Command(update={}, goto=END)defsend_reply(state: EmailAgentState) -> dict:"""Send the email response"""# Integrate with email service    print(f"Sending reply: {state['draft_response'][:100]}...")return {}

第五步:串联他们到一起

现在我们将节点连接成一个可运行的图。由于我们的节点会自行处理路由决策,因此我们只需要几条必要的边。

from langgraph.checkpoint.memory import MemorySaverfrom langgraph.types import RetryPolicy# Create the graphworkflow = StateGraph(EmailAgentState)# Add nodes with appropriate error handlingworkflow.add_node("read_email", read_email)workflow.add_node("classify_intent", classify_intent)# Add retry policy for nodes that might have transient failuresworkflow.add_node("search_documentation",    search_documentation,    retry_policy=RetryPolicy(max_attempts=3))workflow.add_node("bug_tracking", bug_tracking)workflow.add_node("draft_response", draft_response)workflow.add_node("human_review", human_review)workflow.add_node("send_reply", send_reply)# Add only the essential edgesworkflow.add_edge(START, "read_email")workflow.add_edge("read_email""classify_intent")workflow.add_edge("send_reply", END)# Compile with checkpointer for persistence, in case run graph with Local_Server --> Please compile without checkpointermemory = MemorySaver()app = workflow.compile(checkpointer=memory)

测试

这个样例会走到人工,会调用 interrupt()方法,然后保存所有上下文到 checkpointer,等到人工审批后,根据 thread_id 来恢复流程。代码不会从头开始执行,会继续从端点处执行,会将输入的数据注入到断点返回值中供后续流程使用。

# Test with an urgent billing issueinitial_state = {"email_content""I was charged twice for my subscription! This is urgent!","sender_email""customer@example.com","email_id""email_123","messages": []}# Run with a thread_id for persistenceconfig = {"configurable": {"thread_id""customer_123"}}result = app.invoke(initial_state, config)# The graph will pause at human_reviewprint(f"human review interrupt:{result['__interrupt__']}")# When ready, provide human input to resumefrom langgraph.types import Commandhuman_response = Command(    resume={"approved"True,"edited_response""We sincerely apologize for the double charge. I've initiated an immediate refund..."    })# Resume executionfinal_result = app.invoke(human_response, config)print(f"Email sent successfully!")

最新文章

随机文章

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