From 450eb91fe2be688009ad81ed8cc6db6c22066688 Mon Sep 17 00:00:00 2001 From: Andrew Grangaard Date: Mon, 5 Jun 2023 13:30:11 -0700 Subject: [PATCH] Removes unnecessary backslash escaping for backticks in python (#5751) Fixed python deprecation warning: DeprecationWarning: invalid escape sequence '`' backticks (`) do not have special meaning in python strings and should not be escaped. -- @spazm on twitter ### Who can review: @nfcampos ported this change from javascript, @hwchase17 wrote the original STRUCTURED_FORMAT_INSTRUCTIONS, --- langchain/output_parsers/format_instructions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/output_parsers/format_instructions.py b/langchain/output_parsers/format_instructions.py index 54e5c70c32..d9e5b6b69c 100644 --- a/langchain/output_parsers/format_instructions.py +++ b/langchain/output_parsers/format_instructions.py @@ -1,6 +1,6 @@ # flake8: noqa -STRUCTURED_FORMAT_INSTRUCTIONS = """The output should be a markdown code snippet formatted in the following schema, including the leading and trailing "\`\`\`json" and "\`\`\`": +STRUCTURED_FORMAT_INSTRUCTIONS = """The output should be a markdown code snippet formatted in the following schema, including the leading and trailing "```json" and "```": ```json {{