docs: cross link working w/ memory in tools (#4464)

This commit is contained in:
Vadym Barda
2025-04-30 13:52:10 -04:00
committed by GitHub
parent aa9651910c
commit ce2ba47aff
4 changed files with 116 additions and 70 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ from langgraph.prebuilt import create_react_agent
# highlight-next-line
def prompt(state: AgentState, config: RunnableConfig) -> list[AnyMessage]: # (1)!
user_name = config.get("configurable", {}).get("user_name")
user_name = config["configurable"].get("user_name")
system_msg = f"You are a helpful assistant. Address the user as {user_name}."
return [{"role": "system", "content": system_msg}] + state["messages"]