乐于分享
好东西不私藏

LangChain 源码剖析-结构化输出详解(Structured output)

LangChain 源码剖析-结构化输出详解(Structured output)

LangChain 源码剖析-结构化输出详解(Structured output)

  • 结构化输出允许代理以特定的、可预测的格式返回数据。您可以获得JSON对象、Pydantic模型或应用程序可以直接使用的数据类形式的结构化数据,而不是解析自然语言响应。
  • LangChain的create_agent自动处理结构化输出。用户设置他们想要的结构化输出模式,当模型生成结构化数据时,它会被捕获、验证,并在代理状态的"structured_response"键中返回。
def create_agent(    ...    response_format: Union[        ToolStrategy[StructuredResponseT],        ProviderStrategy[StructuredResponseT],        type[StructuredResponseT],    ]

响应格式(Response Format)

  • 控制代理返回结构化数据的方式
  • 当直接提供模式类型时,LangChain会自动选择

供应商策略(ProviderStrategy[StructuredResponseT])

  • 使用提供程序本机结构化输出
  • 一些模型提供者通过其API原生支持结构化输出(例如OpenAI、Grok、Gemini)。这是最可靠的方法。
class ProviderStrategy(Generic[SchemaT]):    schema: type[SchemaT]

ProviderStrategy: schema参数

  • Pydantic模型:带字段验证的BaseModel子类
pip install pydanic
from pydantic import BaseModel, Fieldfrom langchain.agents import create_agentclass ContactInfo(BaseModel):    """Contact information for a person."""    name: str = Field(description="The name of the person")    email: str = Field(description="The email address of the person")    phone: str = Field(description="The phone number of the person")agent = create_agent(    model="gpt-5",    response_format=ContactInfo  # Auto-selects ProviderStrategy)result = agent.invoke({    "messages": [{"role""user""content""Extract contact info from: John Doe, john@example.com, (555) 123-4567"}]})print(result["structured_response"])# ContactInfo(name='John Doe', email='john@example.com', phone='(555) 123-4567')
  • Dataclasses:带有类型注释的Python数据类
from dataclasses import dataclassfrom langchain.agents import create_agent@dataclassclass ContactInfo:    """Contact information for a person."""    name: str # The name of the person    email: str # The email address of the person    phone: str # The phone number of the personagent = create_agent(    model="gpt-5",    tools=tools,    response_format=ContactInfo  # Auto-selects ProviderStrategy)result = agent.invoke({    "messages": [{"role""user""content""Extract contact info from: John Doe, john@example.com, (555) 123-4567"}]})result["structured_response"]# ContactInfo(name='John Doe', email='john@example.com', phone='(555) 123-4567')
  • TypedDict:类型化字典类
from typing_extensions import TypedDictfrom langchain.agents import create_agentclass ContactInfo(TypedDict):    """Contact information for a person."""    name: str # The name of the person    email: str # The email address of the person    phone: str # The phone number of the personagent = create_agent(    model="gpt-5",    tools=tools,    response_format=ContactInfo  # Auto-selects ProviderStrategy)result = agent.invoke({    "messages": [{"role""user""content""Extract contact info from: John Doe, john@example.com, (555) 123-4567"}]})result["structured_response"]# {'name': 'John Doe', 'email': 'john@example.com', 'phone': '(555) 123-4567'}
  • JSON Schema:具有JSON模式规范的字典
from langchain.agents import create_agentcontact_info_schema = {    "type""object",    "description""Contact information for a person.",    "properties": {        "name": {"type""string""description""The name of the person"},        "email": {"type""string""description""The email address of the person"},        "phone": {"type""string""description""The phone number of the person"}    },    "required": ["name""email""phone"]}agent = create_agent(    model="gpt-5",    tools=tools,    response_format=ProviderStrategy(contact_info_schema))result = agent.invoke({    "messages": [{"role""user""content""Extract contact info from: John Doe, john@example.com, (555) 123-4567"}]})result["structured_response"]# {'name''John Doe''email''john@example.com''phone''(555) 123-4567'}

工具策略(ToolStrategy[StructuredResponseT])

  • 使用工具调用进行结构化输出
  • 对于不支持本机结构化输出的模型,LangChain使用工具调用来实现相同的结果。这适用于支持工具调用的所有模型,这是最现代的模型。
class ToolStrategy(Generic[SchemaT]):    schema: type[SchemaT]    tool_message_content: str | None    handle_errors: Union[        bool,        str,        type[Exception],        tuple[type[Exception], ...],        Callable[[Exception], str],    ]

ToolStrategy: schema参数

  • Pydantic模型:带字段验证的BaseModel子类
from pydantic import BaseModel, Fieldfrom typing import Literalfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyclass ProductReview(BaseModel):    """Analysis of a product review."""    rating: int | None = Field(description="The rating of the product", ge=1, le=5)    sentiment: Literal["positive""negative"] = Field(description="The sentiment of the review")    key_points: list[str] = Field(description="The key points of the review. Lowercase, 1-3 words each.")agent = create_agent(    model="gpt-5",    tools=tools,    response_format=ToolStrategy(ProductReview))result = agent.invoke({    "messages": [{"role""user""content""Analyze this review: 'Great product: 5 out of 5 stars. Fast shipping, but expensive'"}]})result["structured_response"]# ProductReview(rating=5, sentiment='positive', key_points=['fast shipping', 'expensive'])
  • Dataclasses:带有类型注释的Python数据类
from dataclasses import dataclassfrom typing import Literalfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategy@dataclassclass ProductReview:    """Analysis of a product review."""    rating: int | None  # The rating of the product (1-5)    sentiment: Literal["positive""negative"]  # The sentiment of the review    key_points: list[str]  # The key points of the reviewagent = create_agent(    model="gpt-5",    tools=tools,    response_format=ToolStrategy(ProductReview))result = agent.invoke({    "messages": [{"role""user""content""Analyze this review: 'Great product: 5 out of 5 stars. Fast shipping, but expensive'"}]})result["structured_response"]# ProductReview(rating=5, sentiment='positive', key_points=['fast shipping', 'expensive'])
  • TypedDict:类型化字典类
from typing import Literalfrom typing_extensions import TypedDictfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyclass ProductReview(TypedDict):    """Analysis of a product review."""    rating: int | None  # The rating of the product (1-5)    sentiment: Literal["positive""negative"]  # The sentiment of the review    key_points: list[str]  # The key points of the reviewagent = create_agent(    model="gpt-5",    tools=tools,    response_format=ToolStrategy(ProductReview))result = agent.invoke({    "messages": [{"role""user""content""Analyze this review: 'Great product: 5 out of 5 stars. Fast shipping, but expensive'"}]})result["structured_response"]# {'rating': 5, 'sentiment': 'positive', 'key_points': ['fast shipping', 'expensive']}
  • JSON Schema:具有JSON模式规范的字典
from langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyproduct_review_schema = {    "type""object",    "description""Analysis of a product review.",    "properties": {        "rating": {            "type": ["integer""null"],            "description""The rating of the product (1-5)",            "minimum"1,            "maximum"5        },        "sentiment": {            "type""string",            "enum": ["positive""negative"],            "description""The sentiment of the review"        },        "key_points": {            "type""array",            "items": {"type""string"},            "description""The key points of the review"        }    },    "required": ["sentiment""key_points"]}agent = create_agent(    model="gpt-5",    tools=tools,    response_format=ToolStrategy(product_review_schema))result = agent.invoke({    "messages": [{"role""user""content""Analyze this review: 'Great product: 5 out of 5 stars. Fast shipping, but expensive'"}]})result["structured_response"]# {'rating'5'sentiment''positive''key_points': ['fast shipping''expensive']}
  • 联合类型:多种模式选项。模型将根据上下文选择最合适的模式。
from pydantic import BaseModel, Fieldfrom typing import LiteralUnionfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyclass ProductReview(BaseModel):    """Analysis of a product review."""    rating: int | None = Field(description="The rating of the product", ge=1, le=5)    sentiment: Literal["positive""negative"] = Field(description="The sentiment of the review")    key_points: list[str] = Field(description="The key points of the review. Lowercase, 1-3 words each.")class CustomerComplaint(BaseModel):    """A customer complaint about a product or service."""    issue_type: Literal["product""service""shipping""billing"] = Field(description="The type of issue")    severity: Literal["low""medium""high"] = Field(description="The severity of the complaint")    description: str = Field(description="Brief description of the complaint")agent = create_agent(    model="gpt-5",    tools=tools,    response_format=ToolStrategy(Union[ProductReview, CustomerComplaint]))result = agent.invoke({    "messages": [{"role""user""content""Analyze this review: 'Great product: 5 out of 5 stars. Fast shipping, but expensive'"}]})result["structured_response"]# ProductReview(rating=5, sentiment='positive', key_points=['fast shipping', 'expensive'])

自定义工具消息内容(Custom tool message content)

  • tool_message_content参数允许您自定义生成结构化输出时出现在对话历史记录中的消息:
from pydantic import BaseModel, Fieldfrom typing import Literalfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyclass MeetingAction(BaseModel):    """Action items extracted from a meeting transcript."""    task: str = Field(description="The specific task to be completed")    assignee: str = Field(description="Person responsible for the task")    priority: Literal["low""medium""high"] = Field(description="Priority level")agent = create_agent(    model="gpt-5",    tools=[],    response_format=ToolStrategy(        schema=MeetingAction,        tool_message_content="Action item captured and added to meeting notes!"    ))agent.invoke({    "messages": [{"role""user""content""From our meeting: Sarah needs to update the project timeline as soon as possible"}]})
  • 响应信息
================================ Human Message =================================From our meeting: Sarah needs to update the project timeline as soon as possible================================== Ai Message ==================================Tool Calls:  MeetingAction (call_1) Call ID: call_1  Args:    task: Update the project timeline    assignee: Sarah    priority: high================================= Tool Message =================================Name: MeetingActionAction item captured and added to meeting notes!
  • 如果没有tool_message_content,我们的最终ToolMessage将是:
================================= Tool Message =================================NameMeetingActionReturning structured response: {'task''update the project timeline''assignee''Sarah''priority''high'}

异常处理(Error handling)

  • 模型在通过工具调用生成结构化输出时可能会出错。LangChain提供了智能重试机制来自动处理这些错误。

多重结构化输出错误(Multiple structured outputs error)

  • 当模型错误地调用多个结构化输出工具时,代理会在ToolMessage中提供错误反馈,并提示模型重试:
from pydantic import BaseModel, Fieldfrom typing import Unionfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyclass ContactInfo(BaseModel):    name: str = Field(description="Person's name")    email: str = Field(description="Email address")class EventDetails(BaseModel):    event_name: str = Field(description="Name of the event")    date: str = Field(description="Event date")agent = create_agent(    model="gpt-5",    tools=[],    response_format=ToolStrategy(Union[ContactInfo, EventDetails])  # Default: handle_errors=True)agent.invoke({    "messages": [{"role""user""content""Extract info: John Doe (john@email.com) is organizing Tech Conference on March 15th"}]})
  • 响应信息
================================ Human Message =================================Extract info: John Doe (john@email.comis organizing Tech Conference on March 15thNone================================== Ai Message ==================================Tool Calls:  ContactInfo (call_1) Call ID: call_1  Args:    name: John Doe    email: john@email.com  EventDetails (call_2) Call ID: call_2  Args:    event_name: Tech Conference    date: March 15th================================= Tool Message =================================Name: ContactInfoError: Model incorrectly returned multiple structured responses (ContactInfo, EventDetailswhen only one is expected. Please fix your mistakes.================================= Tool Message =================================Name: EventDetailsError: Model incorrectly returned multiple structured responses (ContactInfo, EventDetailswhen only one is expected. Please fix your mistakes.================================== Ai Message ==================================Tool Calls:  ContactInfo (call_3) Call ID: call_3  Args:    name: John Doe    email: john@email.com================================= Tool Message =================================Name: ContactInfoReturning structured response: {'name''John Doe''email''john@email.com'}

架构验证错误(Schema validation error)

  • 当结构化输出与预期模式不匹配时,代理会提供特定的错误反馈:
from pydantic import BaseModel, Fieldfrom langchain.agents import create_agentfrom langchain.agents.structured_output import ToolStrategyclass ProductRating(BaseModel):    rating: int | None = Field(description="Rating from 1-5", ge=1, le=5)    comment: str = Field(description="Review comment")agent = create_agent(    model="gpt-5",    tools=[],    response_format=ToolStrategy(ProductRating),  # Default: handle_errors=True    system_prompt="You are a helpful assistant that parses product reviews. Do not make any field or value up.")agent.invoke({    "messages": [{"role""user""content""Parse this: Amazing product, 10/10!"}]})
  • 响应信息
================================ Human Message =================================Parse this: Amazing product, 10/10!================================== Ai Message ==================================Tool Calls:  ProductRating (call_1) Call ID: call_1  Args:    rating: 10    comment: Amazing product================================= Tool Message =================================Name: ProductRatingError: Failed to parse structured output for tool 'ProductRating'1 validation error for ProductRating.rating  Input should be less than or equal to 5 [type=less_than_equal, input_value=10, input_type=int]. Please fix your mistakes.================================== Ai Message ==================================Tool Calls:  ProductRating (call_2) Call ID: call_2  Args:    rating: 5    comment: Amazing product================================= Tool Message =================================Name: ProductRatingReturning structured response: {'rating'5'comment''Amazing product'}

错误处理策略

  • 您可以使用handle_errors参数自定义错误的处理方式:
  • 自定义错误消息:
ToolStrategy(    schema=ProductRating,    handle_errors="Please provide a valid rating between 1-5 and include a comment.")
  • 如果handle_errors是一个字符串,代理程序将始终提示模型使用固定的工具消息重试:
================================= Tool Message =================================Name: ProductRatingPlease provide a valid rating between 1-5 and include a comment.
  • 仅处理特定异常:
ToolStrategy(    schema=ProductRating,    handle_errors=ValueError  # Only retry on ValueError, raise others)
  • 如果handle_errors是异常类型,则代理将仅在引发的异常是指定类型时重试(使用默认错误消息)。在所有其他情况下,将提出例外情况。
  • 处理多种异常类型:
ToolStrategy(    schema=ProductRating,    handle_errors=(ValueError, TypeError)  # Retry on ValueError and TypeError)
  • 如果handle_errors是一个异常元组,则代理将仅在引发的异常是指定类型之一时重试(使用默认错误消息)。在所有其他情况下,将提出例外情况。
  • 自定义错误处理函数:
from langchain.agents.structured_output import StructuredOutputValidationErrorfrom langchain.agents.structured_output import MultipleStructuredOutputsErrordef custom_error_handler(errorException) -> str:    if isinstance(error, StructuredOutputValidationError):        return "There was an issue with the format. Try again.    elif isinstance(error, MultipleStructuredOutputsError):        return "Multiple structured outputs were returned. Pick the most relevant one."    else:        return f"Error: {str(error)}"agent = create_agent(    model="gpt-5",    tools=[],    response_format=ToolStrategy(                        schema=Union[ContactInfo, EventDetails],                        handle_errors=custom_error_handler                    )  # Default: handle_errors=True)result = agent.invoke({    "messages": [{"role": "user", "content": "Extract info: John Doe (john@email.com) is organizing Tech Conference on March 15th"}]})for msg in result['messages']:    # If message is actually a ToolMessage object (not a dict), check its class name    if type(msg).__name__ == "ToolMessage":        print(msg.content)    # If message is a dictionary or you want a fallback    elif isinstance(msg, dict) and msg.get('tool_call_id'):        print(msg['content'])
  • 在 StructuredOutputValidationError 响应:
================================= Tool Message =================================Name: ToolStrategyThere was an issue with the format. Try again.
  • 在 MultipleStructuredOutputsError 响应:
================================= Tool Message =================================Name: ToolStrategyMultiple structured outputs were returned. Pick the most relevant one.
  • 在 other errors 响应:
================================= Tool Message =================================NameToolStrategyError<errormessage>
  • 无错误处理:
response_format = ToolStrategy(    schema=ProductRating,    handle_errors=False  # All errors raised)
基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-05-20 07:54:10 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/641810.html
  2. 运行时间 : 0.245858s [ 吞吐率:4.07req/s ] 内存消耗:4,837.28kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=62e3fe62f330a0c2f813e53e6d6671ad
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000671s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000759s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.077182s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.012017s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000585s ]
  6. SELECT * FROM `set` [ RunTime:0.031806s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000747s ]
  8. SELECT * FROM `article` WHERE `id` = 641810 LIMIT 1 [ RunTime:0.014077s ]
  9. UPDATE `article` SET `lasttime` = 1779234850 WHERE `id` = 641810 [ RunTime:0.014485s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000249s ]
  11. SELECT * FROM `article` WHERE `id` < 641810 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.011253s ]
  12. SELECT * FROM `article` WHERE `id` > 641810 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000460s ]
  13. SELECT * FROM `article` WHERE `id` < 641810 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001549s ]
  14. SELECT * FROM `article` WHERE `id` < 641810 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001848s ]
  15. SELECT * FROM `article` WHERE `id` < 641810 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000712s ]
0.247542s