摘要: 背景 SERP API 缓存选哪个 stack,取决于流量模式、QPS、运维成本。4 种主流方案对比。 1. 内存缓存(进程内) import time from collections import OrderedDict class MemoryCache: def __init__(self, 阅读全文
posted @ 2026-07-21 10:24 蜘蛛人 阅读(90) 评论(0) 推荐(0)
摘要: 背景 LangChain 的 agent 需要工具,Google 搜索是最常见的一个。SERP API 的 /google/search 包装成 LangChain Tool 只需要几行。 安装 pip install langchain langchain-anthropic requests T 阅读全文
posted @ 2026-06-20 20:22 蜘蛛人 阅读(10) 评论(1) 推荐(0)