LangChain的核心架构

1.基本知识

2.为啥要拆成这么多包

3.LangServe的实现细节

python 复制代码
from fastapi import FastAPI
from langchain_core.prompts import ChatPromptTemplate
from langchain_openai import ChatOpenAI
from langserve import add_routes

app = FastAPI()
prompt = ChatPromptTemplate.from_template("翻译成英文:{text}")
chain = prompt | ChatOpenAI()

# 一行代码把 Chain 变成 API
add_routes(app, chain, path="/translate")

4.LangSmith解决什么问题

5.追问

相关推荐
染指11101 小时前
142.Agent-多Agent框架-通过Skills实现多Agent
开发语言·人工智能·python·langchain·agents
憧憬成为java架构高手的小白3 小时前
langchain4j手敲理解
java·langchain
M--Y4 小时前
LangChain 提示工程:少样本提示与输出解析器
python·langchain·大模型·llm·输出解析器·少样本提示
打工仔折腾 AI5 小时前
极空间用 Docker 部署 Photopea:网页版 PS 的私有化实践
运维·后端·python·docker·容器·langchain·ai agent 实战
for_ever_love__6 小时前
LangChain Agentic RAG:让 Agent 自己决定要不要检索、检索几次
人工智能·golang·langchain·rag·langgraph·agentic·自适应检索
范中勤6 小时前
技术文档:模型工厂 `llm_provider` / `llm_use` 分层设计
设计模式·langchain·架构设计·模型工厂·llm_provider
for_ever_love__7 小时前
LangChain MultiVectorRetriever:一个文档存多个向量
人工智能·python·自然语言处理·langchain·ai大模型·多向量·摘要检索
for_ever_love__7 小时前
LangChain SelfQueryRetriever:让模型自己写过滤条件
人工智能·语言模型·langchain·nlp·全文检索·元数据查询·自查询检索
for_ever_love__8 小时前
LangChain 时间加权检索:让‘最近的事‘更容易被想起
人工智能·语言模型·数据挖掘·langchain·向量·检索·时间加权