From a8b5d8a9a9aac0076767c0224d34e7c7ec9523f2 Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Fri, 2 May 2025 00:49:46 +0800 Subject: [PATCH 01/10] update prompt --- community_usecase/product_survey/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community_usecase/product_survey/main.py b/community_usecase/product_survey/main.py index df1df42c5..20bf0c8a9 100644 --- a/community_usecase/product_survey/main.py +++ b/community_usecase/product_survey/main.py @@ -144,7 +144,7 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question - default_task = "please give me a product survey report for manus product.and then make a react website for it.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." + default_task = "please give me a product survey report for manus product.and then make a react website for it.finally,download the this web into pdf file and open it.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task From fb92dbf36081564ef6e7f9124fad9de954d130df Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Fri, 2 May 2025 00:51:41 +0800 Subject: [PATCH 02/10] update prompt --- community_usecase/product_survey/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community_usecase/product_survey/main.py b/community_usecase/product_survey/main.py index 20bf0c8a9..1e4a6cc4e 100644 --- a/community_usecase/product_survey/main.py +++ b/community_usecase/product_survey/main.py @@ -144,7 +144,7 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question - default_task = "please give me a product survey report for manus product.and then make a react website for it.finally,download the this web into pdf file and open it.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." + default_task = "please give me a product survey report for manus product.which official web url is https://manus.im.And then using react framework to make a website for it.Finally,download the this web into pdf file and open it by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task From 60f296c71c72c0314c380ef8830eed0e33cbb85b Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Fri, 2 May 2025 01:04:20 +0800 Subject: [PATCH 03/10] update prompt and package --- community_usecase/product_survey/main.py | 16 ++++++++-------- pyproject.toml | 1 + requirements.txt | 1 + 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/community_usecase/product_survey/main.py b/community_usecase/product_survey/main.py index 1e4a6cc4e..86a20405c 100644 --- a/community_usecase/product_survey/main.py +++ b/community_usecase/product_survey/main.py @@ -63,37 +63,37 @@ def construct_society(question: str) -> RolePlaying: models = { "user": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), "assistant": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), "browsing": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), "planning": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), "video": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), "image": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), "document": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4_1, model_config_dict={"temperature": 0}, ), } @@ -144,7 +144,7 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question - default_task = "please give me a product survey report for manus product.which official web url is https://manus.im.And then using react framework to make a website for it.Finally,download the this web into pdf file and open it by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." + default_task = "please give me a product survey report for manus product.which official web url is https://manus.im.And then using vite to create react framework to make a ppt website for it.Finally,download the this web into pdf file and open it by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task diff --git a/pyproject.toml b/pyproject.toml index 772c23f69..b2d72b502 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ dependencies = [ "mcp-server-fetch==2025.1.17", "xmltodict>=0.14.2", "pyautogui", + "firecrawl", ] [project.urls] diff --git a/requirements.txt b/requirements.txt index c27edabf4..4904a214d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ gradio>=3.50.2 mcp-simple-arxiv==0.2.2 mcp-server-fetch==2025.1.17 pyautogui +firecrawl \ No newline at end of file From 5a3961d965f35df929e6db96414ec062876fbdea Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Fri, 2 May 2025 19:17:32 +0800 Subject: [PATCH 04/10] update prompt --- .../main.py | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) rename community_usecase/{product_survey => product_research}/main.py (86%) diff --git a/community_usecase/product_survey/main.py b/community_usecase/product_research/main.py similarity index 86% rename from community_usecase/product_survey/main.py rename to community_usecase/product_research/main.py index 86a20405c..75420a5f6 100644 --- a/community_usecase/product_survey/main.py +++ b/community_usecase/product_research/main.py @@ -63,37 +63,37 @@ def construct_society(question: str) -> RolePlaying: models = { "user": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), "assistant": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), "browsing": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), "planning": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), "video": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), "image": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), "document": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4_1, + model_type=ModelType.GPT_4O, model_config_dict={"temperature": 0}, ), } @@ -111,7 +111,7 @@ def construct_society(question: str) -> RolePlaying: *AudioAnalysisToolkit().get_tools(), # This requires OpenAI Key *CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(), *ImageAnalysisToolkit(model=models["image"]).get_tools(), - SearchToolkit().search_duckduckgo, + # SearchToolkit().search_duckduckgo, SearchToolkit().search_google, # Comment this out if you don't have google search SearchToolkit().search_wiki, *ExcelToolkit().get_tools(), @@ -144,7 +144,11 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question - default_task = "please give me a product survey report for manus product.which official web url is https://manus.im.And then using vite to create react framework to make a ppt website for it.Finally,download the this web into pdf file and open it by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc." + default_task = """ +please give me a product research report for Manus vs OWL.there are official web url are https://manus.im and https://github.com/camel-ai/owl. +and then put the content in markdown format.then using markdown-pdf to convert the markdown file into pdf file. refer:https://www.npmjs.com/package/markdown-pdf. +Finally,search the suitable local app to open this pdf by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc. +""" # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task From 70e33344625aaea1eed2c993e51500e000b40718 Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Sun, 4 May 2025 22:36:08 +0800 Subject: [PATCH 05/10] update prompt --- community_usecase/product_research/main.py | 34 +++++++++++++++------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/community_usecase/product_research/main.py b/community_usecase/product_research/main.py index 75420a5f6..9a9bb1899 100644 --- a/community_usecase/product_research/main.py +++ b/community_usecase/product_research/main.py @@ -63,37 +63,37 @@ def construct_society(question: str) -> RolePlaying: models = { "user": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), "assistant": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), "browsing": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), "planning": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), "video": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), "image": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), "document": ModelFactory.create( model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O, + model_type=ModelType.GPT_4O_MINI, model_config_dict={"temperature": 0}, ), } @@ -108,7 +108,7 @@ def construct_society(question: str) -> RolePlaying: *PyAutoGUIToolkit().get_tools(), *TerminalToolkit(working_dir=workspace_dir).get_tools(), *VideoAnalysisToolkit(model=models["video"]).get_tools(), - *AudioAnalysisToolkit().get_tools(), # This requires OpenAI Key + *AudioAnalysisToolkit().get_tools(), # This requires OPENAI Key *CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(), *ImageAnalysisToolkit(model=models["image"]).get_tools(), # SearchToolkit().search_duckduckgo, @@ -145,10 +145,22 @@ def main(): r"""Main function to run the OWL system with an example question.""" # Default research question default_task = """ -please give me a product research report for Manus vs OWL.there are official web url are https://manus.im and https://github.com/camel-ai/owl. -and then put the content in markdown format.then using markdown-pdf to convert the markdown file into pdf file. refer:https://www.npmjs.com/package/markdown-pdf. -Finally,search the suitable local app to open this pdf by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc. +please give me a very long and detail product research report for Manus vs OWL. +firstly, you need to use Browsertoolkit to brower there official web or repo: + Manus:https://manus.im/ + OWL:https://github.com/camel-ai/owl. + +then, you need to use TerminalToolkit to create a markdown file to write the product research report. +after you create the markdown,you need to check the product research report markdown file path by TerminalToolkit. +and then put the content in markdown format.then write a script which using markdown-pdf to convert the markdown file into pdf file. package using refer:https://www.npmjs.com/package/markdown-pdf. +Finally,search the suitable local app to open this pdf by local app.and then using PyAutoGUITOOkit scroll down the pdf for user. +please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc. """ +# default_task = """ +# please give me a product research report for Manus vs OWL.there are official web url are https://manus.im and https://github.com/camel-ai/owl. +# and then put the content in markdown format.then using markdown-pdf to convert the markdown file into pdf file. refer:https://www.npmjs.com/package/markdown-pdf. +# Finally,search the suitable local app to open this pdf by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc. +# """ # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task From 8ac0bef697e7e694a70d6221f726e5b2470b1a14 Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Tue, 6 May 2025 19:56:06 +0800 Subject: [PATCH 06/10] update --- .../main.py | 83 +++++++------------ pyproject.toml | 71 ---------------- requirements.txt | 8 -- 3 files changed, 29 insertions(+), 133 deletions(-) rename community_usecase/{product_research => Smart_city_research}/main.py (55%) delete mode 100644 pyproject.toml delete mode 100644 requirements.txt diff --git a/community_usecase/product_research/main.py b/community_usecase/Smart_city_research/main.py similarity index 55% rename from community_usecase/product_research/main.py rename to community_usecase/Smart_city_research/main.py index 9a9bb1899..954bc3eed 100644 --- a/community_usecase/product_research/main.py +++ b/community_usecase/Smart_city_research/main.py @@ -14,14 +14,10 @@ import sys import pathlib from dotenv import load_dotenv +from camel.configs import MistralConfig from camel.models import ModelFactory from camel.toolkits import ( - AudioAnalysisToolkit, - CodeExecutionToolkit, - ExcelToolkit, - ImageAnalysisToolkit, SearchToolkit, - VideoAnalysisToolkit, BrowserToolkit, FileWriteToolkit, TerminalToolkit, @@ -62,40 +58,27 @@ def construct_society(question: str) -> RolePlaying: # Create models for different components models = { "user": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, + model_platform=ModelPlatformType.MISTRAL, + model_type=ModelType.MISTRAL_LARGE, + model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "assistant": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, + model_platform=ModelPlatformType.MISTRAL, + model_type=ModelType.MISTRAL_LARGE, + model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "browsing": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, + model_platform=ModelPlatformType.MISTRAL, + model_type=ModelType.MISTRAL_LARGE, + model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "planning": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, - ), - "video": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, - ), - "image": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, - ), - "document": ModelFactory.create( - model_platform=ModelPlatformType.OPENAI, - model_type=ModelType.GPT_4O_MINI, - model_config_dict={"temperature": 0}, + model_platform=ModelPlatformType.MISTRAL, + model_type=ModelType.MISTRAL_LARGE, + model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), + + } # Configure toolkits @@ -107,14 +90,8 @@ def construct_society(question: str) -> RolePlaying: ).get_tools(), *PyAutoGUIToolkit().get_tools(), *TerminalToolkit(working_dir=workspace_dir).get_tools(), - *VideoAnalysisToolkit(model=models["video"]).get_tools(), - *AudioAnalysisToolkit().get_tools(), # This requires OPENAI Key - *CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(), - *ImageAnalysisToolkit(model=models["image"]).get_tools(), # SearchToolkit().search_duckduckgo, SearchToolkit().search_google, # Comment this out if you don't have google search - SearchToolkit().search_wiki, - *ExcelToolkit().get_tools(), *DocumentProcessingToolkit(model=models["document"]).get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), ] @@ -144,23 +121,21 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question - default_task = """ -please give me a very long and detail product research report for Manus vs OWL. -firstly, you need to use Browsertoolkit to brower there official web or repo: - Manus:https://manus.im/ - OWL:https://github.com/camel-ai/owl. - -then, you need to use TerminalToolkit to create a markdown file to write the product research report. -after you create the markdown,you need to check the product research report markdown file path by TerminalToolkit. -and then put the content in markdown format.then write a script which using markdown-pdf to convert the markdown file into pdf file. package using refer:https://www.npmjs.com/package/markdown-pdf. -Finally,search the suitable local app to open this pdf by local app.and then using PyAutoGUITOOkit scroll down the pdf for user. -please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc. + default_task = """Conduct a comprehensive research on smart city technologies and implementations: + +1. Search for the latest smart city initiatives in major global cities and identify common technologies they use. +2. Browse official websites of 2-3 leading smart city technology providers to understand their key solutions. +3. Analyze how IoT sensors, AI, and data analytics are integrated in traffic management and public transportation systems. +4. Research case studies of successful smart city implementations that reduced energy consumption and carbon emissions. +5. Investigate privacy and security concerns in smart city data collection. +6. Create a brief report documenting your findings, including: + - Top 5 emerging smart city technologies + - Success metrics used to evaluate smart city projects + - Implementation challenges and solutions + - Future trends in smart urban planning + +Save the report as 'smart_city_research.md' in the current directory with properly formatted sections. """ -# default_task = """ -# please give me a product research report for Manus vs OWL.there are official web url are https://manus.im and https://github.com/camel-ai/owl. -# and then put the content in markdown format.then using markdown-pdf to convert the markdown file into pdf file. refer:https://www.npmjs.com/package/markdown-pdf. -# Finally,search the suitable local app to open this pdf by local app.please make full use of the Browsertoolkit、TerminalToolkit、PyAutoGUIToolkit、FileWriteToolkit etc. -# """ # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index b2d72b502..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,71 +0,0 @@ -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[project] -name = "owl" -version = "0.0.1" -description = "Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation" -authors = [{ name = "CAMEL-AI.org" }] -requires-python = ">=3.10,<3.13" -readme = "README.md" -license = "Apache-2.0" -keywords = [ - "optimized-workforce-learning", - "multi-agent-assistance", - "task-automation", - "real-world-tasks", - "artificial-intelligence", - "agent-collaboration", - "workforce-optimization", - "learning-systems" -] -dependencies = [ - "camel-ai[owl]==0.2.49", - "chunkr-ai>=0.0.41", - "docx2markdown>=0.1.1", - "gradio>=3.50.2", - "mcp-simple-arxiv==0.2.2", - "mcp-server-fetch==2025.1.17", - "xmltodict>=0.14.2", - "pyautogui", - "firecrawl", -] - -[project.urls] -Homepage = "https://www.camel-ai.org/" -Repository = "https://github.com/camel-ai/owl" -Documentation = "https://docs.camel-ai.org" - -[tool.hatch.build.targets.wheel] -packages = ["owl"] - -[tool.mypy] -python_version = "3.11" -warn_return_any = false -warn_unused_configs = true -disallow_untyped_defs = false -disallow_incomplete_defs = false -check_untyped_defs = false -disallow_untyped_decorators = false -no_implicit_optional = false -strict_optional = false -ignore_missing_imports = true -allow_redefinition = true -disable_error_code = ["assignment", "arg-type", "return-value"] - -[[tool.mypy.overrides]] -module = "camel.*" -ignore_missing_imports = true -follow_imports = "skip" - -[[tool.mypy.overrides]] -module = "utils" -ignore_missing_imports = true - -[tool.codespell] -# Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = '.git*,*.pdf,*.lock' -check-hidden = true -ignore-regex = '\bBrin\b' -ignore-words-list = 'datas' diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4904a214d..000000000 --- a/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -camel-ai[owl]==0.2.49 -chunkr-ai>=0.0.41 -docx2markdown>=0.1.1 -gradio>=3.50.2 -mcp-simple-arxiv==0.2.2 -mcp-server-fetch==2025.1.17 -pyautogui -firecrawl \ No newline at end of file From 2919f497aeb2851fb929d7bdf306c47434b36640 Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Tue, 6 May 2025 20:01:35 +0800 Subject: [PATCH 07/10] resolve conflict --- examples/run_claude.py | 54 ++++-------------------------------------- 1 file changed, 5 insertions(+), 49 deletions(-) diff --git a/examples/run_claude.py b/examples/run_claude.py index cc788dcee..c3f7b9871 100644 --- a/examples/run_claude.py +++ b/examples/run_claude.py @@ -14,10 +14,14 @@ import sys import pathlib from dotenv import load_dotenv -from camel.configs import MistralConfig from camel.models import ModelFactory from camel.toolkits import ( + AudioAnalysisToolkit, + CodeExecutionToolkit, + ExcelToolkit, + ImageAnalysisToolkit, SearchToolkit, + VideoAnalysisToolkit, BrowserToolkit, FileWriteToolkit, ) @@ -47,26 +51,6 @@ def construct_society(question: str) -> RolePlaying: # Create models for different components models = { "user": ModelFactory.create( -<<<<<<<< HEAD:community_usecase/Smart_city_research/main.py - model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, - model_config_dict=MistralConfig(temperature=0.0).as_dict(), - ), - "assistant": ModelFactory.create( - model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, - model_config_dict=MistralConfig(temperature=0.0).as_dict(), - ), - "browsing": ModelFactory.create( - model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, - model_config_dict=MistralConfig(temperature=0.0).as_dict(), - ), - "planning": ModelFactory.create( - model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, - model_config_dict=MistralConfig(temperature=0.0).as_dict(), -======== model_platform=ModelPlatformType.ANTHROPIC, model_type=ModelType.CLAUDE_3_7_SONNET, model_config_dict={"temperature": 0}, @@ -100,10 +84,7 @@ def construct_society(question: str) -> RolePlaying: model_platform=ModelPlatformType.ANTHROPIC, model_type=ModelType.CLAUDE_3_7_SONNET, model_config_dict={"temperature": 0}, ->>>>>>>> main:examples/run_claude.py ), - - } # Configure toolkits @@ -113,19 +94,12 @@ def construct_society(question: str) -> RolePlaying: web_agent_model=models["browsing"], planning_agent_model=models["planning"], ).get_tools(), -<<<<<<<< HEAD:community_usecase/Smart_city_research/main.py - *PyAutoGUIToolkit().get_tools(), - *TerminalToolkit(working_dir=workspace_dir).get_tools(), - # SearchToolkit().search_duckduckgo, - SearchToolkit().search_google, # Comment this out if you don't have google search -======== *VideoAnalysisToolkit(model=models["video"]).get_tools(), *CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(), *ImageAnalysisToolkit(model=models["image"]).get_tools(), SearchToolkit().search_duckduckgo, SearchToolkit().search_wiki, *ExcelToolkit().get_tools(), ->>>>>>>> main:examples/run_claude.py *DocumentProcessingToolkit(model=models["document"]).get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), ] @@ -155,25 +129,7 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question -<<<<<<<< HEAD:community_usecase/Smart_city_research/main.py - default_task = """Conduct a comprehensive research on smart city technologies and implementations: - -1. Search for the latest smart city initiatives in major global cities and identify common technologies they use. -2. Browse official websites of 2-3 leading smart city technology providers to understand their key solutions. -3. Analyze how IoT sensors, AI, and data analytics are integrated in traffic management and public transportation systems. -4. Research case studies of successful smart city implementations that reduced energy consumption and carbon emissions. -5. Investigate privacy and security concerns in smart city data collection. -6. Create a brief report documenting your findings, including: - - Top 5 emerging smart city technologies - - Success metrics used to evaluate smart city projects - - Implementation challenges and solutions - - Future trends in smart urban planning - -Save the report as 'smart_city_research.md' in the current directory with properly formatted sections. -""" -======== default_task = "Open Brave search, summarize the github stars, fork counts, etc. of camel-ai's camel framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file. Note: You have been provided with the necessary tools to complete this task." ->>>>>>>> main:examples/run_claude.py # Override default task if command line argument is provided task = sys.argv[1] if len(sys.argv) > 1 else default_task From c31344502209e7d50cb7e18d5106eab980973acc Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Tue, 6 May 2025 20:22:30 +0800 Subject: [PATCH 08/10] update tool --- community_usecase/Smart_city_research/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/community_usecase/Smart_city_research/main.py b/community_usecase/Smart_city_research/main.py index 954bc3eed..7894729f8 100644 --- a/community_usecase/Smart_city_research/main.py +++ b/community_usecase/Smart_city_research/main.py @@ -67,6 +67,11 @@ def construct_society(question: str) -> RolePlaying: model_type=ModelType.MISTRAL_LARGE, model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), + "document": ModelFactory.create( + model_platform=ModelPlatformType.MISTRAL, + model_type=ModelType.MISTRAL_LARGE, + model_config_dict=MistralConfig(temperature=0.0).as_dict(), + ), "browsing": ModelFactory.create( model_platform=ModelPlatformType.MISTRAL, model_type=ModelType.MISTRAL_LARGE, From 0e7074c80b8448b44f119885b63882045f0df5f2 Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Tue, 6 May 2025 21:38:12 +0800 Subject: [PATCH 09/10] update package --- pyproject.toml | 2 +- requirements.txt | 2 +- uv.lock | 46 ++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e072688a3..174e74bef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ keywords = [ "learning-systems" ] dependencies = [ - "camel-ai[owl]==0.2.52", + "camel-ai[owl]==0.2.54", "docx2markdown>=0.1.1", "gradio>=3.50.2", "mcp-simple-arxiv==0.2.2", diff --git a/requirements.txt b/requirements.txt index 4031cba4e..667184334 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -camel-ai[owl]==0.2.52 +camel-ai[owl]==0.2.54 docx2markdown>=0.1.1 gradio>=3.50.2 mcp-simple-arxiv==0.2.2 diff --git a/uv.lock b/uv.lock index 648b072f4..82c750b7c 100644 --- a/uv.lock +++ b/uv.lock @@ -13,6 +13,22 @@ resolution-markers = [ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')", ] +[[package]] +name = "aci-sdk" +version = "1.0.0b1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "griffe" }, + { name = "httpx" }, + { name = "pydantic" }, + { name = "tenacity" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/9d/0d956545331ac6760af30a7bc6492083a84b32f16faa89f28ee269a83dac/aci_sdk-1.0.0b1.tar.gz", hash = "sha256:9130bf196c680deda2004d71b091883bc468ea1649d71dbf676b9172c067d4ef", size = 63449 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e2/57/2f1cfb3ee6a84e355a09dd94a4c3c5d1dbe9dbb925950c6903cb8ef2a216/aci_sdk-1.0.0b1-py3-none-any.whl", hash = "sha256:f3d9f3de58c518ecf4fc44ebedf1e4a1e23a30df268782989d1ce8852bd47175", size = 31713 }, +] + [[package]] name = "aiofiles" version = "24.1.0" @@ -257,7 +273,7 @@ wheels = [ [[package]] name = "camel-ai" -version = "0.2.52" +version = "0.2.54" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama" }, @@ -270,13 +286,14 @@ dependencies = [ { name = "pydantic" }, { name = "tiktoken" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c0/a8/7231d11a72292e97f8e805d80e9c7c9b70df1ce63388bc0fe11352dd8e18/camel_ai-0.2.52.tar.gz", hash = "sha256:b033e737f8e50e35eb2bb6e945b4113483b8aa43ad21c8a432c380c59aefa46d", size = 542315 } +sdist = { url = "https://files.pythonhosted.org/packages/53/87/e3f87c6fa0ee2bf27d62b1d82f0091d34a793b57e79158b9f2b9812e95e6/camel_ai-0.2.54.tar.gz", hash = "sha256:06f53e8312fb5040aa0fe2daf69b54feda6c51dbb12af2a2ea9a575d8c5d454b", size = 549261 } wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/61/27fe54b9b0736acb4328dc66764b675a835b4e14b7498c650f922c2bae3b/camel_ai-0.2.52-py3-none-any.whl", hash = "sha256:cd4e1e7d91d0511e7689f8a6033bb382e54fbf2d57b8133983452cbc77d4f5b8", size = 906573 }, + { url = "https://files.pythonhosted.org/packages/cc/70/25605a9d9dd92f450cd5900f7469902fe4a1bf91455a3b4a84e6b8ad4203/camel_ai-0.2.54-py3-none-any.whl", hash = "sha256:dcb5fa588555f074d51ec3090893940aa258cd3008a698144ddcec57a60d5b9a", size = 916899 }, ] [package.optional-dependencies] owl = [ + { name = "aci-sdk" }, { name = "anthropic" }, { name = "beautifulsoup4" }, { name = "chunkr-ai" }, @@ -1175,6 +1192,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c0/ba/82a2c3b9868644ee6011da742156247070f30e952f4d33f33857458450f2/greenlet-3.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7132e024ebeeeabbe661cf8878aac5d2e643975c4feae833142592ec2f03263d", size = 296207 }, ] +[[package]] +name = "griffe" +version = "1.7.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a9/3e/5aa9a61f7c3c47b0b52a1d930302992229d191bf4bc76447b324b731510a/griffe-1.7.3.tar.gz", hash = "sha256:52ee893c6a3a968b639ace8015bec9d36594961e156e23315c8e8e51401fa50b", size = 395137 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/c6/5c20af38c2a57c15d87f7f38bee77d63c1d2a3689f74fefaf35915dd12b2/griffe-1.7.3-py3-none-any.whl", hash = "sha256:c6b3ee30c2f0f17f30bcdef5068d6ab7a2a4f1b8bf1a3e74b56fffd21e1c5f75", size = 129303 }, +] + [[package]] name = "groovy" version = "0.1.2" @@ -2347,7 +2376,7 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "camel-ai", extras = ["owl"], specifier = "==0.2.52" }, + { name = "camel-ai", extras = ["owl"], specifier = "==0.2.54" }, { name = "docx2markdown", specifier = ">=0.1.1" }, { name = "gradio", specifier = ">=3.50.2" }, { name = "mcp-server-fetch", specifier = "==2025.1.17" }, @@ -3838,6 +3867,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/40/44/4a5f08c96eb108af5cb50b41f76142f0afa346dfa99d5296fe7202a11854/tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f", size = 35252 }, ] +[[package]] +name = "tenacity" +version = "9.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0a/d4/2b0cd0fe285e14b36db076e78c93766ff1d529d70408bd1d2a5a84f1d929/tenacity-9.1.2.tar.gz", hash = "sha256:1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb", size = 48036 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/30/643397144bfbfec6f6ef821f36f33e57d35946c44a2352d3c9f0ae847619/tenacity-9.1.2-py3-none-any.whl", hash = "sha256:f77bf36710d8b73a50b2dd155c97b870017ad21afe6ab300326b0371b3b05138", size = 28248 }, +] + [[package]] name = "tf-playwright-stealth" version = "1.1.2" From 632874d8ff119ecbf3f2817d558805a0a2c191b2 Mon Sep 17 00:00:00 2001 From: "yifeng.wang" <3038880699@qq.com> Date: Thu, 8 May 2025 04:04:38 +0800 Subject: [PATCH 10/10] update prompt --- community_usecase/Smart_city_research/main.py | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/community_usecase/Smart_city_research/main.py b/community_usecase/Smart_city_research/main.py index 7894729f8..1514ab38e 100644 --- a/community_usecase/Smart_city_research/main.py +++ b/community_usecase/Smart_city_research/main.py @@ -59,22 +59,22 @@ def construct_society(question: str) -> RolePlaying: models = { "user": ModelFactory.create( model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, + model_type="pixtral-large-latest", model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "assistant": ModelFactory.create( model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, + model_type="pixtral-large-latest", model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "document": ModelFactory.create( model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, + model_type="pixtral-large-latest", model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "browsing": ModelFactory.create( model_platform=ModelPlatformType.MISTRAL, - model_type=ModelType.MISTRAL_LARGE, + model_type="pixtral-large-latest", model_config_dict=MistralConfig(temperature=0.0).as_dict(), ), "planning": ModelFactory.create( @@ -95,8 +95,8 @@ def construct_society(question: str) -> RolePlaying: ).get_tools(), *PyAutoGUIToolkit().get_tools(), *TerminalToolkit(working_dir=workspace_dir).get_tools(), - # SearchToolkit().search_duckduckgo, - SearchToolkit().search_google, # Comment this out if you don't have google search + SearchToolkit().search_duckduckgo, + # SearchToolkit().search_google, # Comment this out if you don't have google search *DocumentProcessingToolkit(model=models["document"]).get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), ] @@ -126,20 +126,18 @@ def construct_society(question: str) -> RolePlaying: def main(): r"""Main function to run the OWL system with an example question.""" # Default research question - default_task = """Conduct a comprehensive research on smart city technologies and implementations: - -1. Search for the latest smart city initiatives in major global cities and identify common technologies they use. -2. Browse official websites of 2-3 leading smart city technology providers to understand their key solutions. -3. Analyze how IoT sensors, AI, and data analytics are integrated in traffic management and public transportation systems. -4. Research case studies of successful smart city implementations that reduced energy consumption and carbon emissions. -5. Investigate privacy and security concerns in smart city data collection. -6. Create a brief report documenting your findings, including: - - Top 5 emerging smart city technologies - - Success metrics used to evaluate smart city projects - - Implementation challenges and solutions - - Future trends in smart urban planning - -Save the report as 'smart_city_research.md' in the current directory with properly formatted sections. + default_task = """ +please help me to make a research on smart city technology. +Fisrtly, please use the duckduckgo search to search the following topic: +What are the current trends in smart city technology? +and then,only browse the most related website urls to get the information. + +secondly, make a pdf for me to present the research results. + +finally, open the pdf and take screenshot for me. +if there are some packages that are not installed, please install them for me. + + """ # Override default task if command line argument is provided