From b88ce2b7bcc7110abc49c4417b8ad5f25b349fac Mon Sep 17 00:00:00 2001 From: iff Date: Tue, 7 Jan 2025 02:14:27 +0100 Subject: [PATCH] fix: trim markdown json identifier --- module-request-ai/src/requests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/module-request-ai/src/requests.rs b/module-request-ai/src/requests.rs index 630d8df..cbd416b 100644 --- a/module-request-ai/src/requests.rs +++ b/module-request-ai/src/requests.rs @@ -166,6 +166,7 @@ The command `{last_command}` returns the following error message: `{error_msg}`. str?; str.expect("AI module: Failed to get content from response") .trim_start_matches("```") + .trim_start_matches("json") .trim_end_matches("```") }; let json = serde_json::from_str(str);