🐫 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: Bump crawl4ai from 0.3.745 to 0.4.0 and add test for Crawl4AIToolkit (#2770)
Lei Zhangc3d718542c63
diff --git a/pyproject.toml b/pyproject.tomlindex 8e4e7ccc9..c9f08a411 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -369,7 +369,7 @@ all = ["mem0ai>=0.1.67","math-verify>=0.7.0,<0.8","exa-py>=1.10.0,<2",- "crawl4ai>=0.3.745",+ "crawl4ai>=0.4.0","pyautogui>=0.9.54,<0.10","pyobvector>=0.1.18","scrapegraph-py>=1.12.0,<2",diff --git a/test/toolkits/test_craw4ai_toolkit.py b/test/toolkits/test_craw4ai_toolkit.pynew file mode 100644index 000000000..a7698d65b--- /dev/null+++ b/test/toolkits/test_craw4ai_toolkit.py@@ -0,0 +1,29 @@+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========++import pytest++from camel.toolkits.craw4ai_toolkit import Crawl4AIToolkit++[email protected](scope="function")+def toolkit_fixture():+ return Crawl4AIToolkit(timeout=600)+++async def test_scrape_success(toolkit_fixture):+ url = "https://github.com/camel-ai/camel/blob/master/LICENSE"+ result = await toolkit_fixture.scrape(url)+ assert len(result) > 0diff --git a/uv.lock b/uv.lockindex 9d8535a11..2b1788247 100644--- a/uv.lock+++ b/uv.lock@@ -1032,7 +1032,7 @@ requires-dist = [{ name = "cohere", marker = "extra == 'model-platforms'", specifier = ">=5.11.0,<6" },{ name = "cohere", marker = "extra == 'rag'", specifier = ">=5.11.0,<6" },{ name = "colorama", specifier = ">=0.4.6,<0.5" },- { name = "crawl4ai", marker = "extra == 'all'", specifier = ">=0.3.745" },+ { name = "crawl4ai", marker = "extra == 'all'", specifier = ">=0.4.0" },{ name = "crawl4ai", marker = "extra == 'document-tools'", specifier = ">=0.3.745" },{ name = "crawl4ai", marker = "extra == 'owl'", specifier = ">=0.3.745" },{ name = "crawl4ai", marker = "extra == 'rag'", specifier = ">=0.3.745" },