DEV Community · LLM· nRouter·· 6 天前AI 评分46
如何通过 nRouter 网关接入 LangChain
The base_url Is the Whole Integration: LangChain Through a Gateway
AI 导读
文章演示如何通过 ChatOpenAI 的 `base_url` 将 LangChain 流量接入 nRouter 网关,而无需更改提示模板、Memory、LCEL 管道或流式处理。网关可在服务端筛查提示词、按请求路由模型,并在响应中提供费用、追踪 ID 和实际服务模型信息;OpenAIEmbeddings 也可使用同一端点。
来源:DEV Community · LLM · dev.to