🐫 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: Move usecase under example folder, update config (#2395)
Wendong-Fanbf44333e95b3
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex bed195640..e0a165796 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -4,9 +4,9 @@ repos:hooks:- id: ruffargs: [--fix, --exit-non-zero-on-fix, --show-fixes]- exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks+ exclude: ^(docs/cookbooks/|examples/usecases/) # Ignore files under docs/cookbooks and examples/usecases- id: ruff-format- exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks+ exclude: ^(docs/cookbooks/|examples/usecases/) # Ignore files under docs/cookbooks and examples/usecases- repo: localhooks:@@ -17,7 +17,7 @@ repos:types: [python]pass_filenames: falserequire_serial: true- exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks+ exclude: ^(docs/cookbooks/|examples/usecases/) # Ignore files under docs/cookbooks and examples/usecases- repo: localhooks:@@ -26,12 +26,13 @@ repos:entry: python licenses/update_license.py . licenses/license_template.txtlanguage: systemtypes: [python]- exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks+ exclude: ^(docs/cookbooks/|examples/usecases/) # Ignore files under docs/cookbooks and examples/usecases- repo: https://github.com/codespell-project/codespell# Configuration for codespell is in pyproject.tomlrev: v2.4.1hooks:- id: codespell+ exclude: ^(examples/usecases/) # Ignore files under examples/usecasesadditional_dependencies:- tomli # for python_version < '3.11'diff --git a/camel/toolkits/base.py b/camel/toolkits/base.pyindex f819f68ef..19420f9e5 100644--- a/camel/toolkits/base.py+++ b/camel/toolkits/base.py@@ -53,11 +53,13 @@ class BaseToolkit(metaclass=AgentOpsMeta):"""raise NotImplementedError("Subclasses must implement this method.")- def run_mcp_server(self, mode: Literal["stdio", "sse"]) -> None:+ def run_mcp_server(+ self, mode: Literal["stdio", "sse", "streamable-http"]+ ) -> None:r"""Run the MCP server in the specified mode.Args:- mode (Literal["stdio", "sse"]): The mode to run+ mode (Literal["stdio", "sse", "streamable-http"]): The mode to runthe MCP server in."""self.mcp.run(mode)diff --git a/apps/Airbnb-MCP/README.md b/examples/usecases/airbnb_mcp/README.mdsimilarity index 100%rename from apps/Airbnb-MCP/README.mdrename to examples/usecases/airbnb_mcp/README.mddiff --git a/apps/Airbnb-MCP/app.py b/examples/usecases/airbnb_mcp/app.pysimilarity index 100%rename from apps/Airbnb-MCP/app.pyrename to examples/usecases/airbnb_mcp/app.pydiff --git a/apps/Airbnb-MCP/assets/logo_airbnb_mcp.png b/examples/usecases/airbnb_mcp/assets/logo_airbnb_mcp.pngsimilarity index 100%rename from apps/Airbnb-MCP/assets/logo_airbnb_mcp.pngrename to examples/usecases/airbnb_mcp/assets/logo_airbnb_mcp.pngdiff --git a/apps/Airbnb-MCP/assets/logo_camel_ai.png b/examples/usecases/airbnb_mcp/assets/logo_camel_ai.pngsimilarity index 100%rename from apps/Airbnb-MCP/assets/logo_camel_ai.pngrename to examples/usecases/airbnb_mcp/assets/logo_camel_ai.pngdiff --git a/apps/Airbnb-MCP/assets/screenshot.png b/examples/usecases/airbnb_mcp/assets/screenshot.pngsimilarity index 100%rename from apps/Airbnb-MCP/assets/screenshot.pngrename to examples/usecases/airbnb_mcp/assets/screenshot.pngdiff --git a/apps/Airbnb-MCP/mcp_servers_config.json b/examples/usecases/airbnb_mcp/mcp_servers_config.jsonsimilarity index 100%rename from apps/Airbnb-MCP/mcp_servers_config.jsonrename to examples/usecases/airbnb_mcp/mcp_servers_config.jsondiff --git a/apps/Airbnb-MCP/requirements.txt b/examples/usecases/airbnb_mcp/requirements.txtsimilarity index 100%rename from apps/Airbnb-MCP/requirements.txtrename to examples/usecases/airbnb_mcp/requirements.txtdiff --git a/apps/chat_with_github/README.md b/examples/usecases/chat_with_github/README.mdsimilarity index 100%rename from apps/chat_with_github/README.mdrename to examples/usecases/chat_with_github/README.mddiff --git a/apps/chat_with_github/app.py b/examples/usecases/chat_with_github/app.pysimilarity index 100%rename from apps/chat_with_github/app.pyrename to examples/usecases/chat_with_github/app.pydiff --git a/apps/chat_with_github/assets/logo_camel_ai.png b/examples/usecases/chat_with_github/assets/logo_camel_ai.pngsimilarity index 100%rename from apps/chat_with_github/assets/logo_camel_ai.pngrename to examples/usecases/chat_with_github/assets/logo_camel_ai.pngdiff --git a/apps/chat_with_github/assets/logo_github.jpg b/examples/usecases/chat_with_github/assets/logo_github.jpgsimilarity index 100%rename from apps/chat_with_github/assets/logo_github.jpgrename to examples/usecases/chat_with_github/assets/logo_github.jpgdiff --git a/apps/chat_with_github/assets/screenshot_chat.png b/examples/usecases/chat_with_github/assets/screenshot_chat.pngsimilarity index 100%rename from apps/chat_with_github/assets/screenshot_chat.pngrename to examples/usecases/chat_with_github/assets/screenshot_chat.pngdiff --git a/apps/chat_with_github/demo_git_ingest.py b/examples/usecases/chat_with_github/demo_git_ingest.pysimilarity index 100%rename from apps/chat_with_github/demo_git_ingest.pyrename to examples/usecases/chat_with_github/demo_git_ingest.pydiff --git a/apps/chat_with_github/mcp_servers_config.json b/examples/usecases/chat_with_github/mcp_servers_config.jsonsimilarity index 100%rename from apps/chat_with_github/mcp_servers_config.jsonrename to examples/usecases/chat_with_github/mcp_servers_config.jsondiff --git a/apps/chat_with_github/requirements.txt b/examples/usecases/chat_with_github/requirements.txtsimilarity index 100%rename from apps/chat_with_github/requirements.txtrename to examples/usecases/chat_with_github/requirements.txtdiff --git a/pyproject.toml b/pyproject.tomlindex 781f5eff3..98841e7f4 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -565,7 +565,7 @@ ignore_missing_imports = true# Ref: https://github.com/codespell-project/codespell#using-a-config-file# the .py file needs to be listed twice since pre-commit and codespell treat# that path differently.-skip = '.git*,*.pdf,*.svg,*.lock,*.css,examples/toolkits/semantic_scholar_toolkit.py,./examples/toolkits/semantic_scholar_toolkit.py'+skip = '.git*,*.pdf,*.svg,*.lock,*.css,examples/toolkits/semantic_scholar_toolkit.py,./examples/toolkits/semantic_scholar_toolkit.py,examples/usecases,./examples/usecases'check-hidden = true# Ignore long lines as usually some kind of base64 encodings e.g. in ipynbignore-regex = '^\s*"image/\S+": ".*|^.{300,}|\b(NotIn|Unsupport)\b'