🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
chore: fix doc build (#3624)
Wendong-Fanc9b04424dffe
diff --git a/docs/mintlify/build_api_docs.py b/docs/mintlify/build_api_docs.pyindex 49c4476c9..aac6b4836 100755--- a/docs/mintlify/build_api_docs.py+++ b/docs/mintlify/build_api_docs.py@@ -634,6 +634,41 @@ def escape_mdx_content(text):# Apply JSON wrappingtext = find_and_wrap_json(text)+ # Find and wrap content with >= and <= operators that should be in code format+ # Do this BEFORE angle bracket wrapping to avoid conflicts+ def find_and_wrap_comparison_operators(text):+ """Find comparison operators and wrap them with backticks when appropriate"""+ # Pattern for length constraints like "length >= 1 and <= 100"+ # Match the full expression and wrap it once+ text = re.sub(r'(?<![`\w])(length\s*>=\s*\d+\s*and\s*<=\s*\d+)(?![`\w])', r'`\1`', text)+ text = re.sub(r'(?<![`\w])(>=\s*\d+\s*and\s*<=\s*\d+)(?![`\w])', r'`\1`', text)++ # Extract newly created inline codes to protect them from further processing+ protected = []++ def protect_inline(match):+ protected.append(match.group(0))+ return f"__PROTECTED_{len(protected) - 1}__"++ text = re.sub(r'`[^`\n]+`', protect_inline, text)++ # Now handle standalone comparison operators+ # Pattern for standalone >= or <= with numbers (not inside already wrapped content)+ text = re.sub(r'(?<![`\w])(>=\s*\d+)(?![`\w])', r'`\1`', text)+ text = re.sub(r'(?<![`\w])(<=\s*\d+)(?![`\w])', r'`\1`', text)++ # Restore protected content+ for i, code in enumerate(protected):+ text = text.replace(f"__PROTECTED_{i}__", code)++ return text++ # Apply comparison operator wrapping+ text = find_and_wrap_comparison_operators(text)++ # Extract inline codes created by comparison operator wrapping before angle bracket processing+ text = re.sub(r'`[^`\n]+`', extract_inline_code, text)+# Find and wrap angle bracket content that should be in code formatdef find_and_wrap_angle_brackets(text):"""Find angle bracket content and wrap with backticks when appropriate"""@@ -658,22 +693,6 @@ def escape_mdx_content(text):# Apply angle bracket wrappingtext = find_and_wrap_angle_brackets(text)- # Find and wrap content with >= and <= operators that should be in code format- def find_and_wrap_comparison_operators(text):- """Find comparison operators and wrap them with backticks when appropriate"""- # Pattern for length constraints like "length >= 1 and <= 100"- text = re.sub(r'(length\s*>=\s*\d+\s*and\s*<=\s*\d+)', r'`\1`', text)- text = re.sub(r'(>=\s*\d+\s*and\s*<=\s*\d+)', r'`\1`', text)-- # Pattern for standalone comparison operators with numbers- text = re.sub(r'(?<!\w)(>=\s*\d+)(?!\w)', r'`\1`', text)- text = re.sub(r'(?<!\w)(<=\s*\d+)(?!\w)', r'`\1`', text)-- return text-- # Apply comparison operator wrapping- text = find_and_wrap_comparison_operators(text)-# Now extract ALL newly created inline code sections (including angle brackets and operators)text = re.sub(r'`[^`\n]+`', extract_inline_code, text)diff --git a/docs/mintlify/reference/camel.toolkits.search_toolkit.mdx b/docs/mintlify/reference/camel.toolkits.search_toolkit.mdxindex e5d7fecc0..b4f45624d 100644--- a/docs/mintlify/reference/camel.toolkits.search_toolkit.mdx+++ b/docs/mintlify/reference/camel.toolkits.search_toolkit.mdx@@ -453,7 +453,7 @@ features:**Parameters:**-- **query** (str): The search query string (`length ``>= 1` and `<= 100```).+- **query** (str): The search query string (`length >= 1 and <= 100`).- **time_range** (`Literal["OneDay", "OneWeek", "OneMonth", "OneYear", "NoLimit"]`): Time frame filter for search results. (default: :obj:`"NoLimit"`)- **industry** (`Optional[Literal["finance", "law", "medical", "internet", "tax", "news_province", "news_center"]]`): Industry-specific search filter. When specified, only returns results from sites in the specified industries. Multiple industries can be comma-separated. (default: :obj:`None`)- **return_main_text** (bool): Whether to include the main text of the webpage in results. (default: :obj:`True`)