Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

chore: Move usecase under example folder, update config (#2395)

Wendong-Fanbf44333e95b3
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bed195640..e0a165796 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,9 +4,9 @@ repos:
hooks:
- id: ruff
args: [--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: local
hooks:
@@ -17,7 +17,7 @@ repos:
types: [python]
pass_filenames: false
require_serial: true
- exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks
+ exclude: ^(docs/cookbooks/|examples/usecases/) # Ignore files under docs/cookbooks and examples/usecases
- repo: local
hooks:
@@ -26,12 +26,13 @@ repos:
entry: python licenses/update_license.py . licenses/license_template.txt
language: system
types: [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.toml
rev: v2.4.1
hooks:
- id: codespell
+ exclude: ^(examples/usecases/) # Ignore files under examples/usecases
additional_dependencies:
- tomli # for python_version < '3.11'
diff --git a/camel/toolkits/base.py b/camel/toolkits/base.py
index 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 run
the MCP server in.
"""
self.mcp.run(mode)
diff --git a/apps/Airbnb-MCP/README.md b/examples/usecases/airbnb_mcp/README.md
similarity index 100%
rename from apps/Airbnb-MCP/README.md
rename to examples/usecases/airbnb_mcp/README.md
diff --git a/apps/Airbnb-MCP/app.py b/examples/usecases/airbnb_mcp/app.py
similarity index 100%
rename from apps/Airbnb-MCP/app.py
rename to examples/usecases/airbnb_mcp/app.py
diff --git a/apps/Airbnb-MCP/assets/logo_airbnb_mcp.png b/examples/usecases/airbnb_mcp/assets/logo_airbnb_mcp.png
similarity index 100%
rename from apps/Airbnb-MCP/assets/logo_airbnb_mcp.png
rename to examples/usecases/airbnb_mcp/assets/logo_airbnb_mcp.png
diff --git a/apps/Airbnb-MCP/assets/logo_camel_ai.png b/examples/usecases/airbnb_mcp/assets/logo_camel_ai.png
similarity index 100%
rename from apps/Airbnb-MCP/assets/logo_camel_ai.png
rename to examples/usecases/airbnb_mcp/assets/logo_camel_ai.png
diff --git a/apps/Airbnb-MCP/assets/screenshot.png b/examples/usecases/airbnb_mcp/assets/screenshot.png
similarity index 100%
rename from apps/Airbnb-MCP/assets/screenshot.png
rename to examples/usecases/airbnb_mcp/assets/screenshot.png
diff --git a/apps/Airbnb-MCP/mcp_servers_config.json b/examples/usecases/airbnb_mcp/mcp_servers_config.json
similarity index 100%
rename from apps/Airbnb-MCP/mcp_servers_config.json
rename to examples/usecases/airbnb_mcp/mcp_servers_config.json
diff --git a/apps/Airbnb-MCP/requirements.txt b/examples/usecases/airbnb_mcp/requirements.txt
similarity index 100%
rename from apps/Airbnb-MCP/requirements.txt
rename to examples/usecases/airbnb_mcp/requirements.txt
diff --git a/apps/chat_with_github/README.md b/examples/usecases/chat_with_github/README.md
similarity index 100%
rename from apps/chat_with_github/README.md
rename to examples/usecases/chat_with_github/README.md
diff --git a/apps/chat_with_github/app.py b/examples/usecases/chat_with_github/app.py
similarity index 100%
rename from apps/chat_with_github/app.py
rename to examples/usecases/chat_with_github/app.py
diff --git a/apps/chat_with_github/assets/logo_camel_ai.png b/examples/usecases/chat_with_github/assets/logo_camel_ai.png
similarity index 100%
rename from apps/chat_with_github/assets/logo_camel_ai.png
rename to examples/usecases/chat_with_github/assets/logo_camel_ai.png
diff --git a/apps/chat_with_github/assets/logo_github.jpg b/examples/usecases/chat_with_github/assets/logo_github.jpg
similarity index 100%
rename from apps/chat_with_github/assets/logo_github.jpg
rename to examples/usecases/chat_with_github/assets/logo_github.jpg
diff --git a/apps/chat_with_github/assets/screenshot_chat.png b/examples/usecases/chat_with_github/assets/screenshot_chat.png
similarity index 100%
rename from apps/chat_with_github/assets/screenshot_chat.png
rename to examples/usecases/chat_with_github/assets/screenshot_chat.png
diff --git a/apps/chat_with_github/demo_git_ingest.py b/examples/usecases/chat_with_github/demo_git_ingest.py
similarity index 100%
rename from apps/chat_with_github/demo_git_ingest.py
rename to examples/usecases/chat_with_github/demo_git_ingest.py
diff --git a/apps/chat_with_github/mcp_servers_config.json b/examples/usecases/chat_with_github/mcp_servers_config.json
similarity index 100%
rename from apps/chat_with_github/mcp_servers_config.json
rename to examples/usecases/chat_with_github/mcp_servers_config.json
diff --git a/apps/chat_with_github/requirements.txt b/examples/usecases/chat_with_github/requirements.txt
similarity index 100%
rename from apps/chat_with_github/requirements.txt
rename to examples/usecases/chat_with_github/requirements.txt
diff --git a/pyproject.toml b/pyproject.toml
index 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 ipynb
ignore-regex = '^\s*"image/\S+": ".*|^.{300,}|\b(NotIn|Unsupport)\b'