We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fcd21b commit 1ccaa19Copy full SHA for 1ccaa19
examples/clients/simple-chatbot/mcp_simple_chatbot/main.py
@@ -295,8 +295,8 @@ def _clean_json_string(json_string: str) -> str:
295
"""Remove ```json ... ``` or ``` ... ``` wrappers if the LLM response is fenced."""
296
import re
297
298
- pattern = r'^```(?:\s*json)?\s*(.*?)\s*```$'
299
- return re.sub(pattern, r'\1', json_string, flags=re.DOTALL | re.IGNORECASE).strip()
+ pattern = r"^```(?:\s*json)?\s*(.*?)\s*```$"
+ return re.sub(pattern, r"\1", json_string, flags=re.DOTALL | re.IGNORECASE).strip()
300
301
try:
302
tool_call = json.loads(_clean_json_string(llm_response))
0 commit comments