From 401d469a92223d5b028ea86af09e12ada056d700 Mon Sep 17 00:00:00 2001 From: Mu Yang Date: Fri, 21 Jun 2024 22:05:38 +0800 Subject: [PATCH] langchain: fix systax warning in create_json_chat_agent (#23253) fix systax warning in `create_json_chat_agent` ``` .../langchain/agents/json_chat/base.py:22: SyntaxWarning: invalid escape sequence '\ ' """Create an agent that uses JSON to format its logic, build for Chat Models. ``` --- libs/langchain/langchain/agents/json_chat/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }} ```