From 5c7afe8aae1aad3a062b0b11ec7a693eba073e33 Mon Sep 17 00:00:00 2001 From: Lucas Rodrigues Pereira Date: Sun, 3 Sep 2023 19:00:50 -0300 Subject: [PATCH] Fix json parsing error of MULTI_PROMPT_ROUTER_TEMPLATE (#9944) The output at times lacks the closing markdown code block. The prompt is changed to explicitly request the closing backticks. --- libs/langchain/langchain/chains/router/multi_prompt_prompt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/langchain/langchain/chains/router/multi_prompt_prompt.py b/libs/langchain/langchain/chains/router/multi_prompt_prompt.py index 5221ea9334..b879e718a4 100644 --- a/libs/langchain/langchain/chains/router/multi_prompt_prompt.py +++ b/libs/langchain/langchain/chains/router/multi_prompt_prompt.py @@ -28,4 +28,5 @@ modifications are needed. {{input}} << OUTPUT (must include ```json at the start of the response) >> +<< OUTPUT (must end with ```) >> """