From 72ed54fbe22f465aeb38261df9fd72404e38e14d Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 8 Oct 2025 11:16:48 -0400 Subject: [PATCH] x --- src/oss/langchain/agents.mdx | 2 +- src/oss/langchain/rag.mdx | 6 +++--- src/oss/python/integrations/tools/requests.mdx | 4 ++-- src/oss/python/integrations/tools/sql_database.mdx | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/oss/langchain/agents.mdx b/src/oss/langchain/agents.mdx index 7c33e4177..cbdef97cc 100644 --- a/src/oss/langchain/agents.mdx +++ b/src/oss/langchain/agents.mdx @@ -424,7 +424,7 @@ def dynamic_prompt(state): else "Provide simple, clear explanations." ) return [system_msg] + state["messages"] -agent = create_agent(model, tools, prompt=dynamic_prompt) +agent = create_agent(model, tools, system_prompt=dynamic_prompt) ``` ::: diff --git a/src/oss/langchain/rag.mdx b/src/oss/langchain/rag.mdx index 36a3e6d70..b030ae629 100644 --- a/src/oss/langchain/rag.mdx +++ b/src/oss/langchain/rag.mdx @@ -179,7 +179,7 @@ prompt = ( "You have access to a tool that retrieves context from a blog post. " "Use the tool to help answer user queries." ) -agent = create_agent(llm, tools, prompt=prompt) +agent = create_agent(llm, tools, system_prompt=prompt) ``` ```python @@ -608,7 +608,7 @@ prompt = ( "You have access to a tool that retrieves context from a blog post. " "Use the tool to help answer user queries." ) -agent = create_agent(llm, tools, prompt=prompt) +agent = create_agent(llm, tools, system_prompt=prompt) ``` ::: :::js @@ -782,7 +782,7 @@ def prompt_with_context(state: AgentState) -> list[MessageLikeRepresentation]: return [{"role": "system", "content": system_message}, *list(state["messages"])] -agent = create_agent(llm, tools=[], prompt=prompt_with_context) +agent = create_agent(llm, tools=[], system_prompt=prompt_with_context) ``` ::: :::js diff --git a/src/oss/python/integrations/tools/requests.mdx b/src/oss/python/integrations/tools/requests.mdx index 3bcd31349..940a96751 100644 --- a/src/oss/python/integrations/tools/requests.mdx +++ b/src/oss/python/integrations/tools/requests.mdx @@ -156,13 +156,13 @@ Here is documentation on the API: {api_spec} """.format(api_spec=api_spec) -agent_executor = create_agent(llm, tools, prompt=system_message) +agent = create_agent(llm, tools, system_prompt=system_message) ``` ```python example_query = "Fetch the top two posts. What are their titles?" -events = agent_executor.stream( +events = agent.stream( {"messages": [("user", example_query)]}, stream_mode="values", ) diff --git a/src/oss/python/integrations/tools/sql_database.mdx b/src/oss/python/integrations/tools/sql_database.mdx index fe40984b3..3f2d2f885 100644 --- a/src/oss/python/integrations/tools/sql_database.mdx +++ b/src/oss/python/integrations/tools/sql_database.mdx @@ -151,7 +151,7 @@ We then instantiate the agent: ```python from langchain.agents import create_agent -agent_executor = create_agent(llm, toolkit.get_tools(), prompt=system_message) +agent = create_agent(llm, toolkit.get_tools(), system_prompt=system_message) ``` And issue it a query: @@ -159,7 +159,7 @@ And issue it a query: ```python example_query = "Which country's customers spent the most?" -events = agent_executor.stream( +events = agent.stream( {"messages": [("user", example_query)]}, stream_mode="values", ) @@ -278,7 +278,7 @@ We can also observe the agent recover from an error: ```python example_query = "Who are the top 3 best selling artists?" -events = agent_executor.stream( +events = agent.stream( {"messages": [("user", example_query)]}, stream_mode="values", )