mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 22:56:05 +00:00
docs(langchain-classic): warn about older create_react_agent (#35052)
This commit is contained in:
@@ -7,6 +7,7 @@ from langchain_core._api.deprecation import (
|
||||
warn_deprecated,
|
||||
)
|
||||
|
||||
# TODO: this is old, fix
|
||||
AGENT_DEPRECATION_WARNING = (
|
||||
"LangChain agents will continue to be supported, but it is recommended for new "
|
||||
"use cases to be built with LangGraph. LangGraph offers a more flexible and "
|
||||
|
||||
@@ -28,13 +28,16 @@ def create_react_agent(
|
||||
(https://arxiv.org/abs/2210.03629)
|
||||
|
||||
!!! warning
|
||||
This implementation is based on the foundational ReAct paper but is older and
|
||||
not well-suited for production applications.
|
||||
For a more robust and feature-rich implementation, we recommend using the
|
||||
`create_react_agent` function from the LangGraph library.
|
||||
See the
|
||||
[reference doc](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent)
|
||||
for more information.
|
||||
|
||||
This implementation is based on the foundational ReAct paper but is older and
|
||||
not well-suited for production applications.
|
||||
|
||||
For a more robust and feature-rich implementation, we recommend using the
|
||||
`create_agent` function from the `langchain` library.
|
||||
|
||||
See the
|
||||
[reference doc](https://reference.langchain.com/python/langchain/agents/)
|
||||
for more information.
|
||||
|
||||
Args:
|
||||
llm: LLM to use as the agent.
|
||||
|
||||
@@ -68,7 +68,7 @@ def _load_question_to_checked_assertions_chain(
|
||||
message=(
|
||||
"See LangGraph guides for a variety of self-reflection and corrective "
|
||||
"strategies for question-answering and other tasks: "
|
||||
"https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag/"
|
||||
"https://docs.langchain.com/oss/python/langchain/overview"
|
||||
),
|
||||
removal="1.0",
|
||||
)
|
||||
|
||||
@@ -73,7 +73,7 @@ def _load_sequential_chain(
|
||||
message=(
|
||||
"See LangGraph guides for a variety of self-reflection and corrective "
|
||||
"strategies for question-answering and other tasks: "
|
||||
"https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag/"
|
||||
"https://docs.langchain.com/oss/python/langgraph/agentic-rag"
|
||||
),
|
||||
removal="1.0",
|
||||
)
|
||||
|
||||
@@ -32,9 +32,8 @@ from langchain_classic.chains.llm import LLMChain
|
||||
removal="1.0",
|
||||
message=(
|
||||
"Refer to migration guide here for a recommended implementation using "
|
||||
"LangGraph: https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain/"
|
||||
". See also LangGraph guides for map-reduce: "
|
||||
"https://langchain-ai.github.io/langgraph/how-tos/map-reduce/."
|
||||
"LangGraph: https://docs.langchain.com/oss/python/langgraph/graph-api#map-reduce-and-the-send-api"
|
||||
"."
|
||||
),
|
||||
)
|
||||
class MapReduceChain(Chain):
|
||||
|
||||
@@ -21,7 +21,7 @@ from langchain_classic.memory.prompt import SUMMARY_PROMPT
|
||||
removal="1.0",
|
||||
message=(
|
||||
"Refer here for how to incorporate summaries of conversation history: "
|
||||
"https://langchain-ai.github.io/langgraph/how-tos/memory/add-summary-conversation-history/"
|
||||
"https://docs.langchain.com/oss/python/langgraph/add-memory#summarize-messages"
|
||||
),
|
||||
)
|
||||
class SummarizerMixin(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user