Skip to content

The agent engineering platform.

langchain: fix systax warning in create_json_chat_agent (#23253)

Mu Yang401d469a9222
diff --git a/libs/langchain/langchain/agents/json_chat/base.py b/libs/langchain/langchain/agents/json_chat/base.py
index ecf4ce7f7c..803e2436ba 100644
--- a/libs/langchain/langchain/agents/json_chat/base.py
+++ b/libs/langchain/langchain/agents/json_chat/base.py
@@ -122,8 +122,8 @@ def create_json_chat_agent(
```json
{{
- "action": string, \ The action to take. Must be one of {tool_names}
- "action_input": string \ The input to the action
+ "action": string, \\ The action to take. Must be one of {tool_names}
+ "action_input": string \\ The input to the action
}}
```
@@ -134,7 +134,7 @@ def create_json_chat_agent(
```json
{{
"action": "Final Answer",
- "action_input": string \ You should put what you want to return to use here
+ "action_input": string \\ You should put what you want to return to use here
}}
```