LangChain发布langchain-perplexity 1.4.2,修复Agent API搜索结果与流式输出
此次版本更新包含搜索上下文大小在一次流式调用中只发送一次、响应API缓存token映射、保留Agent API搜索结果,以及依赖升级和文档更新。
AI解读:LangChain发布langchain-perplexity 1.4.2,这是自 1.4.1 之后的版本更新,变更记录由仓库机器人汇总。
修复项包括保留Agent API搜索结果、把Responses API的缓存token映射进input_token_details,以及在 _astream中让search_context_size每次流式调用只发送一次。
同时刷新模型配置数据、修正部分合作方包的依赖,并升级certifi、urllib3、anyio等依赖版本,文档中ChatPerplexity的示例也按Agent API更新。
LangChain发布langchain-perplexity 1.4.2。仓库变更记录显示,该版本在修复Agent API搜索结果保留问题的同时,调整了流式输出和token统计的行为。
1.4.2 的功能修复
变更记录列出的修复有三项:保留Agent API搜索结果(#41349),把Responses API的缓存token映射到input_token_details(#39923),以及在 _astream中让search_context_size每次流式调用只发送一次(#39924)。
- 保留Agent API搜索结果(#41349)
- Responses API缓存token映射进input_token_details(#39923)
- _astream每次流式调用只发送一次search_context_size(#39924)
依赖与文档同步更新
该版本还刷新了模型配置数据(#41354),修正了部分合作方包中的依赖问题(#41266),并更新了ChatPerplexity文档字符串中面向Agent API的示例(#39831)。依赖升级包括certifi从 2025.8.3 升至 2026.10.19(#41377)、urllib3从 2.7.0 升至 2.8.0(#40947)、anyio从 4.11.0 升至 4.14.2(#40633)。