minor update

This commit is contained in:
Sun Tao
2026-02-26 16:03:50 +08:00
parent 338087f95c
commit 5f4e80ae6d
12 changed files with 258 additions and 236 deletions

View File

@@ -18,10 +18,8 @@
[![Star][star-image]][star-url]
[![Package License][package-license-image]][package-license-url]
</div>
<hr>
<div align="center">
@@ -56,10 +54,10 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
<br>
</div>
<!-- # Key Features -->
# 📋 Table of Contents
- [📋 Table of Contents](#-table-of-contents)
@@ -117,7 +115,6 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
# 🔥 News
<div align="center" style="background-color: #e8f5e9; padding: 15px; border-radius: 10px; border: 2px solid #4caf50; margin: 20px 0;">
<h3 style="color: #2e7d32; margin: 0; font-size: 1.3em;">
🧩 <b>NEW: COMMUNITY AGENT CHALLENGES!</b> 🧩
@@ -162,7 +159,6 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
- **[2025.03.07]**: We open-sourced the codebase of the 🦉 OWL project.
- **[2025.03.03]**: OWL achieved the #1 position among open-source frameworks on the GAIA benchmark with a score of 58.18.
# 🎬 Demo Video
https://github.com/user-attachments/assets/2a2a825d-39ea-45c5-9ba1-f9d58efbc372
@@ -187,6 +183,7 @@ This video demonstrates how to install OWL locally and showcases its capabilitie
## **Prerequisites**
### Install Python
Before installing OWL, ensure you have Python installed (version 3.10, 3.11, or 3.12 is supported):
> **Note for GAIA Benchmark Users**: When running the GAIA benchmark evaluation, please use the `gaia58.18` branch which includes a customized version of the CAMEL framework in the `owl/camel` directory. This version contains enhanced toolkits with improved stability specifically optimized for the GAIA benchmark compared to the standard CAMEL installation.
@@ -334,12 +331,14 @@ OWL requires various API keys to interact with different services.
You can set environment variables directly in your terminal:
- **macOS/Linux (Bash/Zsh)**:
```bash
export OPENAI_API_KEY="your-openai-api-key-here"
# Add other required API keys as needed
```
- **Windows (Command Prompt)**:
```batch
set OPENAI_API_KEY=your-openai-api-key-here
```
@@ -356,6 +355,7 @@ You can set environment variables directly in your terminal:
If you prefer using a `.env` file instead, you can:
1. **Copy and Rename the Template**:
```bash
# For macOS/Linux
cd owl
@@ -463,7 +463,6 @@ print(f"\033[94mAnswer: {answer}\033[0m")
OWL will then automatically invoke document-related tools to process the file and extract the answer.
### Example Tasks
Here are some tasks you can try with OWL:
@@ -481,7 +480,9 @@ Here are some tasks you can try with OWL:
OWL's MCP integration provides a standardized way for AI models to interact with various tools and data sources:
Before using MCP, you need to install Node.js first.
### **Install Node.js**
### Windows
Download the official installer: [Node.js](https://nodejs.org/en).
@@ -489,22 +490,27 @@ Download the official installer: [Node.js](https://nodejs.org/en).
Check "Add to PATH" option during installation.
### Linux
```bash
sudo apt update
sudo apt install nodejs npm -y
```
### Mac
```bash
brew install node
```
### **Install Playwright MCP Service**
```bash
npm install -g @executeautomation/playwright-mcp-server
npx playwright install-deps
```
Try our comprehensive MCP examples:
- `examples/run_mcp.py` - Basic MCP functionality demonstration (local call, requires dependencies)
- `examples/run_mcp_sse.py` - Example using the SSE protocol (Use remote services, no dependencies)
@@ -538,17 +544,19 @@ tools = [
Key toolkits include:
### Multimodal Toolkits (Require multimodal model capabilities)
- **BrowserToolkit**: Browser automation for web interaction and navigation
- **VideoAnalysisToolkit**: Video processing and content analysis
- **ImageAnalysisToolkit**: Image analysis and interpretation
### Text-Based Toolkits
- **AudioAnalysisToolkit**: Audio processing (requires OpenAI API)
- **CodeExecutionToolkit**: Python code execution and evaluation
- **SearchToolkit**: Web searches (Google, DuckDuckGo, Wikipedia)
- **DocumentProcessingToolkit**: Document parsing (PDF, DOCX, etc.)
Additional specialized toolkits: ArxivToolkit, GitHubToolkit, GoogleMapsToolkit, MathToolkit, NetworkXToolkit, NotionToolkit, RedditToolkit, WeatherToolkit, and more. For a complete list, see the [CAMEL toolkits documentation](https://docs.camel-ai.org/key_modules/tools.html#built-in-toolkits).
Additional specialized toolkits: ArxivToolkit, GitHubToolkit, GoogleMapsToolkit, MathToolkit, NetworkXToolkit, NotionToolkit, RedditToolkit, WeatherToolkit, and more. For a complete list, see the [CAMEL toolkits documentation](https://docs.camel-ai.org/key_modules/tools).
## Customizing Your Configuration
@@ -613,6 +621,7 @@ Furthermore, to ensure optimal performance on the GAIA benchmark, please note th
When running the benchmark evaluation:
1. Switch to the `gaia69` branch:
```bash
git checkout gaia69
```
@@ -624,7 +633,6 @@ When running the benchmark evaluation:
This will execute the same configuration that achieved our top-ranking performance on the GAIA benchmark.
# ⏱️ Future Plans
We're continuously working to improve OWL. Here's what's on our roadmap:
@@ -647,6 +655,7 @@ We welcome contributions from the community! Here's how you can help:
3. Submit pull requests with your improvements
**Current Issues Open for Contribution:**
- [#1915](https://github.com/camel-ai/camel/issues/1915)
- [#2190](https://github.com/camel-ai/camel/issues/2190)
- [#2165](https://github.com/camel-ai/camel/issues/2165)
@@ -659,9 +668,10 @@ To take on an issue, simply leave a comment stating your interest.
# 🔥 Community
Join us ([*Discord*](https://discord.camel-ai.org/) or [*WeChat*](https://ghli.org/camel/wechat.png)) in pushing the boundaries of finding the scaling laws of agents.
Join us ([_Discord_](https://discord.camel-ai.org/) or [_WeChat_](https://ghli.org/camel/wechat.png)) in pushing the boundaries of finding the scaling laws of agents.
Join us for further discussions!
<!-- ![](./assets/community.png) -->
<img src="./assets/community_code.jpeg" width="50%" />
@@ -709,7 +719,6 @@ cd camel
If you find this repo useful, please cite:
```
@misc{hu2025owl,
title={OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation},
@@ -726,15 +735,12 @@ If you find this repo useful, please cite:
[![Star History Chart](https://api.star-history.com/svg?repos=camel-ai/owl&type=Date)](https://star-history.com/#camel-ai/owl&Date)
[docs-image]: https://img.shields.io/badge/Documentation-EB3ECC
[docs-url]: https://camel-ai.github.io/camel/index.html
[star-image]: https://img.shields.io/github/stars/camel-ai/owl?label=stars&logo=github&color=brightgreen
[star-url]: https://github.com/camel-ai/owl/stargazers
[package-license-image]: https://img.shields.io/badge/License-Apache_2.0-blue.svg
[package-license-url]: https://github.com/camel-ai/owl/blob/main/licenses/LICENSE
[colab-url]: https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing
[colab-image]: https://colab.research.google.com/assets/colab-badge.svg
[huggingface-url]: https://huggingface.co/camel-ai

View File

@@ -2,7 +2,6 @@
🦉 OWL: 労働力学習の最適化による、現実世界のタスク自動化における一般的なマルチエージェント支援
</h1>
<div align="center">
[![ドキュメント][docs-image]][docs-url]
@@ -15,10 +14,8 @@
[![Star][star-image]][star-url]
[![パッケージライセンス][package-license-image]][package-license-url]
</div>
<hr>
<hr>
@@ -55,10 +52,10 @@
<br>
</div>
<!-- # Key Features -->
# 📋 目次
- [📋 目次](#-目次)
@@ -113,7 +110,6 @@
# 🔥 ニュース
<div align="center" style="background-color: #e8f5e9; padding: 15px; border-radius: 10px; border: 2px solid #4caf50; margin: 20px 0;">
<h3 style="color: #2e7d32; margin: 0; font-size: 1.3em;">
🧩 <b>新機能:コミュニティエージェントチャレンジ!</b> 🧩
@@ -255,6 +251,7 @@ OWLは、さまざまなサービスと対話するために複数のAPIキー
### オプション1`.env`ファイルを使用する(推奨)
1. **テンプレートをコピーして名前を変更**
```bash
cd owl
cp .env_template .env
@@ -270,11 +267,13 @@ OWLは、さまざまなサービスと対話するために複数のAPIキー
または、ターミナルで環境変数を直接設定することもできます:
- **macOS/Linux (Bash/Zsh)**
```bash
export OPENAI_API_KEY="your-openai-api-key-here"
```
- **Windows (コマンドプロンプト)**
```batch
set OPENAI_API_KEY="your-openai-api-key-here"
```
@@ -286,8 +285,6 @@ OWLは、さまざまなサービスと対話するために複数のAPIキー
> **注意**:ターミナルで直接設定された環境変数は、現在のセッションでのみ有効です。
## **Dockerでの実行**
OWLはDockerを使用して簡単にデプロイでき、異なるプラットフォーム間で一貫した環境を提供します。
@@ -435,7 +432,6 @@ print(f"\033[94mAnswer: {answer}\033[0m")
OWLは自動的にドキュメント関連のツールを呼び出してファイルを処理し、回答を抽出します。
### 例のタスク
以下のタスクをOWLで試してみてください
@@ -453,7 +449,9 @@ OWLは自動的にドキュメント関連のツールを呼び出してファ
OWLのMCP統合は、AIモデルがさまざまなツールやデータソースと相互作用するための標準化された方法を提供します
MCPを使用する前に、まずNode.jsをインストールする必要があります。
### **Node.jsのインストール**
### Windows
公式インストーラーをダウンロード:[Node.js](https://nodejs.org/en)。
@@ -461,16 +459,20 @@ MCPを使用する前に、まずNode.jsをインストールする必要があ
インストール中に「Add to PATH」オプションをチェックします。
### Linux
```bash
sudo apt update
sudo apt install nodejs npm -y
```
### Mac
```bash
brew install node
```
### **Playwright MCPサービスのインストール**
```bash
npm install -g @executeautomation/playwright-mcp-server
npx playwright install-deps
@@ -508,17 +510,19 @@ tools = [
主要なツールキットには以下が含まれます:
### マルチモーダルツールキット(マルチモーダルモデル機能が必要)
- **BrowserToolkit**:ウェブインタラクションとナビゲーションのためのブラウザ自動化
- **VideoAnalysisToolkit**:ビデオ処理とコンテンツ分析
- **ImageAnalysisToolkit**:画像解析と解釈
### テキストベースのツールキット
- **AudioAnalysisToolkit**音声処理OpenAI APIが必要
- **CodeExecutionToolkit**Pythonコードの実行と評価
- **SearchToolkit**ウェブ検索Google、DuckDuckGo、Wikipedia
- **DocumentProcessingToolkit**ドキュメント解析PDF、DOCXなど
その他の専門ツールキットArxivToolkit、GitHubToolkit、GoogleMapsToolkit、MathToolkit、NetworkXToolkit、NotionToolkit、RedditToolkit、WeatherToolkitなど。完全なツールキットのリストについては、[CAMELツールキットドキュメント](https://docs.camel-ai.org/key_modules/tools.html#built-in-toolkits)を参照してください。
その他の専門ツールキットArxivToolkit、GitHubToolkit、GoogleMapsToolkit、MathToolkit、NetworkXToolkit、NotionToolkit、RedditToolkit、WeatherToolkitなど。完全なツールキットのリストについては、[CAMELツールキットドキュメント](https://docs.camel-ai.org/key_modules/tools)を参照してください。
## カスタマイズ設定
@@ -580,6 +584,7 @@ python owl/webapp_jp.py
OWLのGAIAベンチマークスコア58.18を再現するには:
1. `gaia58.18`ブランチに切り替え:
```bash
git checkout gaia58.18
```
@@ -608,7 +613,6 @@ OWLのGAIAベンチマークスコア58.18を再現するには:
このリポジトリが役立つと思われる場合は、以下を引用してください:
```
@misc{owl2025,
title = {OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation},
@@ -628,6 +632,7 @@ OWLのGAIAベンチマークスコア58.18を再現するには:
3. 改善点を含むプルリクエストを提出する
**現在貢献を受け付けている問題:**
- [#1915](https://github.com/camel-ai/camel/issues/1915)
- [#2190](https://github.com/camel-ai/camel/issues/2190)
- [#2165](https://github.com/camel-ai/camel/issues/2165)
@@ -636,14 +641,16 @@ OWLのGAIAベンチマークスコア58.18を再現するには:
- [#1538](https://github.com/camel-ai/camel/issues/1538)
- [#1481](https://github.com/camel-ai/camel/issues/1481)
問題を引き受けるには、興味を示すコメントを残すだけです。
# 🔥 コミュニティ
エージェントのスケーリング法則を見つけるための限界を押し広げるために、私たちと一緒に参加してください([*Discord*](https://discord.camel-ai.org/)または[*WeChat*](https://ghli.org/camel/wechat.png))。
エージェントのスケーリング法則を見つけるための限界を押し広げるために、私たちと一緒に参加してください([_Discord_](https://discord.camel-ai.org/)または[_WeChat_](https://ghli.org/camel/wechat.png))。
さらなる議論に参加してください!
<!-- ![](./assets/community.png) -->
![](./assets/community.jpeg)
# ❓ FAQ
@@ -676,15 +683,12 @@ cd camel
[![Star History Chart](https://api.star-history.com/svg?repos=camel-ai/owl&type=Date)](https://star-history.com/#camel-ai/owl&Date)
[docs-image]: https://img.shields.io/badge/Documentation-EB3ECC
[docs-url]: https://camel-ai.github.io/camel/index.html
[star-image]: https://img.shields.io/github/stars/camel-ai/owl?label=stars&logo=github&color=brightgreen
[star-url]: https://github.com/camel-ai/owl/stargazers
[package-license-image]: https://img.shields.io/badge/License-Apache_2.0-blue.svg
[package-license-url]: https://github.com/camel-ai/owl/blob/main/licenses/LICENSE
[colab-url]: https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing
[colab-image]: https://colab.research.google.com/assets/colab-badge.svg
[huggingface-url]: https://huggingface.co/camel-ai

View File

@@ -3,7 +3,6 @@
🦉 OWL: 优化劳动力学习的通用智能体,用于处理现实世界的自动化任务
</h1>
<div align="center">
[![文档][docs-image]][docs-url]
@@ -16,7 +15,6 @@
[![Star][star-image]][star-url]
[![软件许可证][package-license-image]][package-license-url]
</div>
<div align="center">
@@ -49,14 +47,12 @@
![](./assets/owl_architecture.png)
<br>
</div>
<!-- # Key Features -->
# 📋 目录
- [📋 目录](#-目录)
@@ -252,6 +248,7 @@ OWL 需要各种 API 密钥来与不同的服务进行交互。`owl/.env_templat
### 选项 1使用 `.env` 文件(推荐)
1. **复制并重命名模板**
```bash
cd owl
cp .env_template .env
@@ -267,11 +264,13 @@ OWL 需要各种 API 密钥来与不同的服务进行交互。`owl/.env_templat
或者,你可以直接在终端中设置环境变量:
- **macOS/Linux (Bash/Zsh)**
```bash
export OPENAI_API_KEY="你的-openai-api-密钥"
```
- **Windows (命令提示符)**
```batch
set OPENAI_API_KEY="你的-openai-api-密钥"
```
@@ -438,6 +437,7 @@ print(f"答案:{answer}")
OWL 将自动调用与文档相关的工具来处理文件并提取答案。
你可以尝试以下示例任务:
- "查询苹果公司的最新股票价格"
- "分析关于气候变化的最新推文情绪"
- "帮我调试这段 Python 代码:[在此粘贴你的代码]"
@@ -449,7 +449,9 @@ OWL 将自动调用与文档相关的工具来处理文件并提取答案。
OWL 的 MCP 集成为 AI 模型与各种工具和数据源的交互提供了标准化的方式。
在使用MCP前需要先安装Node.js。
### **安装 Node.js**
### Windows
下载官方安装包:[Node.js](https://nodejs.org/zh-cn)。
@@ -457,22 +459,27 @@ OWL 的 MCP 集成为 AI 模型与各种工具和数据源的交互提供了标
安装时,勾选 "Add to PATH" 选项。
### Linux
```bash
sudo apt update
sudo apt install nodejs npm -y
```
### Mac
```bash
brew install node
```
### **安装 MCP 服务**
```bash
npm install -g @executeautomation/playwright-mcp-server
npx playwright install-deps
```
查看我们的MCP示例
- `examples/run_mcp.py` - 基础MCP功能演示 (本地调用,需要安装依赖)
- `examples/run_mcp_sse.py` - 使用SSE协议的示例 (使用远程服务,无需安装依赖)
@@ -506,17 +513,19 @@ tools = [
关键工具包包括:
### 多模态工具包(需要模型具备多模态能力)
- **BrowserToolkit**:浏览器自动化,用于网页交互和导航
- **VideoAnalysisToolkit**:视频处理和内容分析
- **ImageAnalysisToolkit**:图像分析和解释
### 基于文本的工具包
- **AudioAnalysisToolkit**:音频处理(需要 OpenAI API
- **CodeExecutionToolkit**Python 代码执行和评估
- **SearchToolkit**网络搜索Google、DuckDuckGo、维基百科
- **DocumentProcessingToolkit**文档解析PDF、DOCX等
其他专用工具包ArxivToolkit、GitHubToolkit、GoogleMapsToolkit、MathToolkit、NetworkXToolkit、NotionToolkit、RedditToolkit、WeatherToolkit等。完整工具包列表请参阅[CAMEL工具包文档](https://docs.camel-ai.org/key_modules/tools.html#built-in-toolkits)。
其他专用工具包ArxivToolkit、GitHubToolkit、GoogleMapsToolkit、MathToolkit、NetworkXToolkit、NotionToolkit、RedditToolkit、WeatherToolkit等。完整工具包列表请参阅[CAMEL工具包文档](https://docs.camel-ai.org/key_modules/tools)。
## 自定义配置
@@ -579,11 +588,13 @@ python owl/webapp_jp.py
要复现我们在 GAIA 基准测试中获得的 58.18 分:
1. 切换到 `gaia58.18` 分支:
```bash
git checkout gaia58.18
```
2. 运行评估脚本:
```bash
python examples/run_gaia_roleplaying.py
```
@@ -605,7 +616,6 @@ python examples/run_gaia_roleplaying.py
如果你觉得这个仓库对你有帮助,请引用:
```
@misc{owl2025,
title = {OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation},
@@ -625,6 +635,7 @@ python examples/run_gaia_roleplaying.py
3. 提交包含您改进的拉取请求
**当前开放贡献的问题:**
- [#1915](https://github.com/camel-ai/camel/issues/1915)
- [#2190](https://github.com/camel-ai/camel/issues/2190)
- [#2165](https://github.com/camel-ai/camel/issues/2165)
@@ -636,7 +647,8 @@ python examples/run_gaia_roleplaying.py
要认领一个问题,只需在该问题下留言表明您的兴趣即可。
# 🔥 社区
加入我们的 ([*Discord*](https://discord.camel-ai.org/) 或 [*微信*](https://ghli.org/camel/wechat.png)) 社区,一起探索智能体扩展规律的边界。
加入我们的 ([_Discord_](https://discord.camel-ai.org/) 或 [_微信_](https://ghli.org/camel/wechat.png)) 社区,一起探索智能体扩展规律的边界。
加入我们,参与更多讨论!
@@ -678,7 +690,6 @@ cd camel
[star-url]: https://github.com/camel-ai/owl/stargazers
[package-license-image]: https://img.shields.io/badge/License-Apache_2.0-blue.svg
[package-license-url]: https://github.com/camel-ai/owl/blob/main/licenses/LICENSE
[colab-url]: https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing
[colab-image]: https://colab.research.google.com/assets/colab-badge.svg
[huggingface-url]: https://huggingface.co/camel-ai

View File

@@ -18,12 +18,10 @@ from camel.models import ModelFactory
from camel.agents import ChatAgent
from camel.toolkits import (
FunctionTool,
AudioAnalysisToolkit,
CodeExecutionToolkit,
ExcelToolkit,
ImageAnalysisToolkit,
SearchToolkit,
VideoAnalysisToolkit,
BrowserToolkit,
FileToolkit,
)
@@ -45,7 +43,6 @@ set_log_level(level="DEBUG")
def construct_agent_list() -> List[Dict[str, Any]]:
web_model = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_5_2,
@@ -83,7 +80,9 @@ def construct_agent_list() -> List[Dict[str, Any]]:
)
search_toolkit = SearchToolkit()
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
document_processing_toolkit = DocumentProcessingToolkit(
model=document_processing_model
)
image_analysis_toolkit = ImageAnalysisToolkit(model=image_analysis_model)
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
file_toolkit = FileToolkit()
@@ -121,7 +120,7 @@ Here are some tips that help you perform web search:
FunctionTool(search_toolkit.search_wiki),
FunctionTool(document_processing_toolkit.extract_document_content),
*browser_toolkit.get_tools(),
]
],
)
document_processing_agent = ChatAgent(
@@ -132,7 +131,7 @@ Here are some tips that help you perform web search:
FunctionTool(image_analysis_toolkit.ask_question_about_image),
FunctionTool(code_runner_toolkit.execute_code),
*file_toolkit.get_tools(),
]
],
)
reasoning_coding_agent = ChatAgent(
@@ -142,7 +141,7 @@ Here are some tips that help you perform web search:
FunctionTool(code_runner_toolkit.execute_code),
FunctionTool(excel_toolkit.extract_excel_content),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
agent_list = []
@@ -150,19 +149,19 @@ Here are some tips that help you perform web search:
web_agent_dict = {
"name": "Web Agent",
"description": "A helpful assistant that can search the web, extract webpage content, simulate browser actions, and retrieve relevant information.",
"agent": web_agent
"agent": web_agent,
}
document_processing_agent_dict = {
"name": "Document Processing Agent",
"description": "A helpful assistant that can process a variety of local and remote documents, including pdf, docx, images, audio, and video, etc.",
"agent": document_processing_agent
"agent": document_processing_agent,
}
reasoning_coding_agent_dict = {
"name": "Reasoning Coding Agent",
"description": "A helpful assistant that specializes in reasoning, coding, and processing excel files. However, it cannot access the internet to search for information. If the task requires python execution, it should be informed to execute the code after writing it.",
"agent": reasoning_coding_agent
"agent": reasoning_coding_agent,
}
agent_list.append(web_agent_dict)
@@ -172,7 +171,6 @@ Here are some tips that help you perform web search:
def construct_workforce() -> Workforce:
coordinator_agent_kwargs = {
"model": ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
@@ -191,12 +189,12 @@ def construct_workforce() -> Workforce:
task_agent = ChatAgent(
"You are a helpful assistant that can decompose tasks and assign tasks to workers.",
**task_agent_kwargs
**task_agent_kwargs,
)
coordinator_agent = ChatAgent(
"You are a helpful assistant that can assign tasks to workers.",
**coordinator_agent_kwargs
**coordinator_agent_kwargs,
)
workforce = Workforce(

View File

@@ -27,12 +27,10 @@ from camel.models import ModelFactory
from camel.agents import ChatAgent
from camel.toolkits import (
FunctionTool,
AudioAnalysisToolkit,
CodeExecutionToolkit,
ExcelToolkit,
ImageAnalysisToolkit,
SearchToolkit,
VideoAnalysisToolkit,
BrowserToolkit,
FileToolkit,
)
@@ -93,7 +91,9 @@ def construct_agent_list() -> List[Dict[str, Any]]:
)
search_toolkit = SearchToolkit()
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
document_processing_toolkit = DocumentProcessingToolkit(
model=document_processing_model
)
image_analysis_toolkit = ImageAnalysisToolkit(model=image_analysis_model)
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
file_toolkit = FileToolkit()
@@ -129,7 +129,7 @@ Here are some tips that help you perform web search:
FunctionTool(search_toolkit.search_wiki),
FunctionTool(document_processing_toolkit.extract_document_content),
*browser_toolkit.get_tools(),
]
],
)
document_processing_agent = ChatAgent(
@@ -140,7 +140,7 @@ Here are some tips that help you perform web search:
FunctionTool(image_analysis_toolkit.ask_question_about_image),
FunctionTool(code_runner_toolkit.execute_code),
*file_toolkit.get_tools(),
]
],
)
reasoning_coding_agent = ChatAgent(
@@ -150,7 +150,7 @@ Here are some tips that help you perform web search:
FunctionTool(code_runner_toolkit.execute_code),
FunctionTool(excel_toolkit.extract_excel_content),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
agent_list = []
@@ -158,19 +158,19 @@ Here are some tips that help you perform web search:
web_agent_dict = {
"name": "Web Agent",
"description": "A helpful assistant that can search the web, extract webpage content, simulate browser actions, and retrieve relevant information.",
"agent": web_agent
"agent": web_agent,
}
document_processing_agent_dict = {
"name": "Document Processing Agent",
"description": "A helpful assistant that can process a variety of local and remote documents, including pdf, docx, images, audio, and video, etc.",
"agent": document_processing_agent
"agent": document_processing_agent,
}
reasoning_coding_agent_dict = {
"name": "Reasoning Coding Agent",
"description": "A helpful assistant that specializes in reasoning, coding, and processing excel files. However, it cannot access the internet to search for information. If the task requires python execution, it should be informed to execute the code after writing it.",
"agent": reasoning_coding_agent
"agent": reasoning_coding_agent,
}
agent_list.append(web_agent_dict)
@@ -200,12 +200,12 @@ def construct_workforce() -> Workforce:
task_agent = ChatAgent(
"You are a helpful assistant that can decompose tasks and assign tasks to workers.",
**task_agent_kwargs
**task_agent_kwargs,
)
coordinator_agent = ChatAgent(
"You are a helpful assistant that can assign tasks to workers.",
**coordinator_agent_kwargs
**coordinator_agent_kwargs,
)
workforce = Workforce(
@@ -247,4 +247,3 @@ def main():
if __name__ == "__main__":
main()

View File

@@ -71,7 +71,9 @@ def construct_agent_list() -> List[Dict[str, Any]]:
)
search_toolkit = SearchToolkit()
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
document_processing_toolkit = DocumentProcessingToolkit(
model=document_processing_model
)
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
file_toolkit = FileToolkit()
excel_toolkit = ExcelToolkit()
@@ -96,7 +98,7 @@ Here are some tips that help you perform web search:
FunctionTool(search_toolkit.search_wiki),
FunctionTool(search_toolkit.search_baidu),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
document_processing_agent = ChatAgent(
@@ -106,7 +108,7 @@ Here are some tips that help you perform web search:
FunctionTool(document_processing_toolkit.extract_document_content),
FunctionTool(code_runner_toolkit.execute_code),
*file_toolkit.get_tools(),
]
],
)
reasoning_coding_agent = ChatAgent(
@@ -116,7 +118,7 @@ Here are some tips that help you perform web search:
FunctionTool(code_runner_toolkit.execute_code),
FunctionTool(excel_toolkit.extract_excel_content),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
agent_list = []
@@ -124,19 +126,19 @@ Here are some tips that help you perform web search:
web_agent_dict = {
"name": "Web Agent",
"description": "A helpful assistant that can search the web, extract webpage content, and retrieve relevant information.",
"agent": web_agent
"agent": web_agent,
}
document_processing_agent_dict = {
"name": "Document Processing Agent",
"description": "A helpful assistant that can process a variety of local and remote documents, including pdf, docx, images, audio, and video, etc.",
"agent": document_processing_agent
"agent": document_processing_agent,
}
reasoning_coding_agent_dict = {
"name": "Reasoning Coding Agent",
"description": "A helpful assistant that specializes in reasoning, coding, and processing excel files. However, it cannot access the internet to search for information. If the task requires python execution, it should be informed to execute the code after writing it.",
"agent": reasoning_coding_agent
"agent": reasoning_coding_agent,
}
agent_list.append(web_agent_dict)
@@ -166,12 +168,12 @@ def construct_workforce() -> Workforce:
task_agent = ChatAgent(
"You are a helpful assistant that can decompose tasks and assign tasks to workers.",
**task_agent_kwargs
**task_agent_kwargs,
)
coordinator_agent = ChatAgent(
"You are a helpful assistant that can assign tasks to workers.",
**coordinator_agent_kwargs
**coordinator_agent_kwargs,
)
workforce = Workforce(
@@ -213,4 +215,3 @@ def main():
if __name__ == "__main__":
main()

View File

@@ -91,7 +91,9 @@ def construct_agent_list() -> List[Dict[str, Any]]:
)
search_toolkit = SearchToolkit()
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
document_processing_toolkit = DocumentProcessingToolkit(
model=document_processing_model
)
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
file_toolkit = FileToolkit()
excel_toolkit = ExcelToolkit()
@@ -126,7 +128,7 @@ Here are some tips that help you perform web search:
FunctionTool(search_toolkit.search_wiki),
FunctionTool(document_processing_toolkit.extract_document_content),
*browser_toolkit.get_tools(),
]
],
)
document_processing_agent = ChatAgent(
@@ -136,7 +138,7 @@ Here are some tips that help you perform web search:
FunctionTool(document_processing_toolkit.extract_document_content),
FunctionTool(code_runner_toolkit.execute_code),
*file_toolkit.get_tools(),
]
],
)
reasoning_coding_agent = ChatAgent(
@@ -146,7 +148,7 @@ Here are some tips that help you perform web search:
FunctionTool(code_runner_toolkit.execute_code),
FunctionTool(excel_toolkit.extract_excel_content),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
agent_list = []
@@ -154,19 +156,19 @@ Here are some tips that help you perform web search:
web_agent_dict = {
"name": "Web Agent",
"description": "A helpful assistant that can search the web, extract webpage content, and retrieve relevant information.",
"agent": web_agent
"agent": web_agent,
}
document_processing_agent_dict = {
"name": "Document Processing Agent",
"description": "A helpful assistant that can process a variety of local and remote documents, including pdf, docx, images, audio, and video, etc.",
"agent": document_processing_agent
"agent": document_processing_agent,
}
reasoning_coding_agent_dict = {
"name": "Reasoning Coding Agent",
"description": "A helpful assistant that specializes in reasoning, coding, and processing excel files. However, it cannot access the internet to search for information. If the task requires python execution, it should be informed to execute the code after writing it.",
"agent": reasoning_coding_agent
"agent": reasoning_coding_agent,
}
agent_list.append(web_agent_dict)
@@ -197,12 +199,12 @@ def construct_workforce() -> Workforce:
task_agent = ChatAgent(
"You are a helpful assistant that can decompose tasks and assign tasks to workers.",
**task_agent_kwargs
**task_agent_kwargs,
)
coordinator_agent = ChatAgent(
"You are a helpful assistant that can assign tasks to workers.",
**coordinator_agent_kwargs
**coordinator_agent_kwargs,
)
workforce = Workforce(
@@ -244,4 +246,3 @@ def main():
if __name__ == "__main__":
main()

View File

@@ -31,11 +31,10 @@ from camel.toolkits import (
ExcelToolkit,
ImageAnalysisToolkit,
SearchToolkit,
VideoAnalysisToolkit,
BrowserToolkit,
FileToolkit,
)
from camel.types import ModelPlatformType, ModelType
from camel.types import ModelPlatformType
from camel.logger import set_log_level
from camel.tasks.task import Task
@@ -92,7 +91,9 @@ def construct_agent_list() -> List[Dict[str, Any]]:
)
search_toolkit = SearchToolkit()
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
document_processing_toolkit = DocumentProcessingToolkit(
model=document_processing_model
)
image_analysis_toolkit = ImageAnalysisToolkit(model=image_analysis_model)
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
file_toolkit = FileToolkit()
@@ -129,7 +130,7 @@ Here are some tips that help you perform web search:
FunctionTool(search_toolkit.search_baidu),
FunctionTool(document_processing_toolkit.extract_document_content),
*browser_toolkit.get_tools(),
]
],
)
document_processing_agent = ChatAgent(
@@ -140,7 +141,7 @@ Here are some tips that help you perform web search:
FunctionTool(image_analysis_toolkit.ask_question_about_image),
FunctionTool(code_runner_toolkit.execute_code),
*file_toolkit.get_tools(),
]
],
)
reasoning_coding_agent = ChatAgent(
@@ -150,7 +151,7 @@ Here are some tips that help you perform web search:
FunctionTool(code_runner_toolkit.execute_code),
FunctionTool(excel_toolkit.extract_excel_content),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
agent_list = []
@@ -158,19 +159,19 @@ Here are some tips that help you perform web search:
web_agent_dict = {
"name": "Web Agent",
"description": "A helpful assistant that can search the web, extract webpage content, and retrieve relevant information.",
"agent": web_agent
"agent": web_agent,
}
document_processing_agent_dict = {
"name": "Document Processing Agent",
"description": "A helpful assistant that can process a variety of local and remote documents, including pdf, docx, images, audio, and video, etc.",
"agent": document_processing_agent
"agent": document_processing_agent,
}
reasoning_coding_agent_dict = {
"name": "Reasoning Coding Agent",
"description": "A helpful assistant that specializes in reasoning, coding, and processing excel files. However, it cannot access the internet to search for information. If the task requires python execution, it should be informed to execute the code after writing it.",
"agent": reasoning_coding_agent
"agent": reasoning_coding_agent,
}
agent_list.append(web_agent_dict)
@@ -200,12 +201,12 @@ def construct_workforce() -> Workforce:
task_agent = ChatAgent(
"You are a helpful assistant that can decompose tasks and assign tasks to workers.",
**task_agent_kwargs
**task_agent_kwargs,
)
coordinator_agent = ChatAgent(
"You are a helpful assistant that can assign tasks to workers.",
**coordinator_agent_kwargs
**coordinator_agent_kwargs,
)
workforce = Workforce(
@@ -247,4 +248,3 @@ def main():
if __name__ == "__main__":
main()

View File

@@ -119,7 +119,9 @@ def construct_agent_list() -> List[Dict[str, Any]]:
)
search_toolkit = SearchToolkit()
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
document_processing_toolkit = DocumentProcessingToolkit(
model=document_processing_model
)
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
file_toolkit = FileToolkit()
excel_toolkit = ExcelToolkit()
@@ -154,7 +156,7 @@ Here are some tips that help you perform web search:
FunctionTool(search_toolkit.search_wiki),
FunctionTool(document_processing_toolkit.extract_document_content),
*browser_toolkit.get_tools(),
]
],
)
document_processing_agent = ChatAgent(
@@ -164,7 +166,7 @@ Here are some tips that help you perform web search:
FunctionTool(document_processing_toolkit.extract_document_content),
FunctionTool(code_runner_toolkit.execute_code),
*file_toolkit.get_tools(),
]
],
)
reasoning_coding_agent = ChatAgent(
@@ -174,7 +176,7 @@ Here are some tips that help you perform web search:
FunctionTool(code_runner_toolkit.execute_code),
FunctionTool(excel_toolkit.extract_excel_content),
FunctionTool(document_processing_toolkit.extract_document_content),
]
],
)
agent_list = []
@@ -182,19 +184,19 @@ Here are some tips that help you perform web search:
web_agent_dict = {
"name": "Web Agent",
"description": "A helpful assistant that can search the web, extract webpage content, and retrieve relevant information.",
"agent": web_agent
"agent": web_agent,
}
document_processing_agent_dict = {
"name": "Document Processing Agent",
"description": "A helpful assistant that can process a variety of local and remote documents, including pdf, docx, images, audio, and video, etc.",
"agent": document_processing_agent
"agent": document_processing_agent,
}
reasoning_coding_agent_dict = {
"name": "Reasoning Coding Agent",
"description": "A helpful assistant that specializes in reasoning, coding, and processing excel files. However, it cannot access the internet to search for information. If the task requires python execution, it should be informed to execute the code after writing it.",
"agent": reasoning_coding_agent
"agent": reasoning_coding_agent,
}
agent_list.append(web_agent_dict)
@@ -233,12 +235,12 @@ def construct_workforce() -> Workforce:
task_agent = ChatAgent(
"You are a helpful assistant that can decompose tasks and assign tasks to workers.",
**task_agent_kwargs
**task_agent_kwargs,
)
coordinator_agent = ChatAgent(
"You are a helpful assistant that can assign tasks to workers.",
**coordinator_agent_kwargs
**coordinator_agent_kwargs,
)
workforce = Workforce(
@@ -280,4 +282,3 @@ def main():
if __name__ == "__main__":
main()

View File

@@ -238,10 +238,11 @@ class DocumentProcessingToolkit(BaseToolkit):
return str(data["data"][0]["markdown"])
else:
logger.warning("Firecrawl API key is not set. Use crawl4ai to extract the content of the webpage.")
logger.warning(
"Firecrawl API key is not set. Use crawl4ai to extract the content of the webpage."
)
return self._extract_webpage_content_with_crawl4ai(url)
def _extract_webpage_content_with_crawl4ai(self, url: str) -> str:
r"""Extract the content of a webpage using crawl4ai."""
try:
@@ -262,10 +263,11 @@ class DocumentProcessingToolkit(BaseToolkit):
logger.warning("No markdown content extracted from the webpage.")
return "No content found on the webpage."
except Exception as e:
logger.error(f"Error while extracting the content of the webpage with crawl4ai: {e}")
logger.error(
f"Error while extracting the content of the webpage with crawl4ai: {e}"
)
return "Error while extracting the content of the webpage."
def _download_file(self, url: str):
r"""Download a file from a URL and save it to the cache directory."""
try:

View File

@@ -110,11 +110,11 @@ class OwlRolePlaying(RolePlaying):
if assistant_agent is not None:
# Ensure functionality consistent with our configuration
if (
hasattr(assistant_agent, 'output_language')
hasattr(assistant_agent, "output_language")
and output_language is not None
):
assistant_agent.output_language = output_language
if hasattr(assistant_agent, 'stop_event'):
if hasattr(assistant_agent, "stop_event"):
assistant_agent.stop_event = stop_event
self.assistant_agent = assistant_agent
# Handle potential None system_message - use provided or fallback
@@ -137,12 +137,9 @@ class OwlRolePlaying(RolePlaying):
if user_agent is not None:
# Ensure functionality consistent with our configuration
if (
hasattr(user_agent, 'output_language')
and output_language is not None
):
if hasattr(user_agent, "output_language") and output_language is not None:
user_agent.output_language = output_language
if hasattr(user_agent, 'stop_event'):
if hasattr(user_agent, "stop_event"):
user_agent.stop_event = stop_event
self.user_agent = user_agent
# Handle potential None system_message - use provided or fallback

View File

@@ -144,7 +144,9 @@ class GAIABenchmark(BaseBenchmark):
data["file_name"] = path / data["file_name"]
self._data[label].append(data)
else:
raise FileNotFoundError(f"Metadata file not found: {metadata_parquet_path} or {metadata_jsonl_path}")
raise FileNotFoundError(
f"Metadata file not found: {metadata_parquet_path} or {metadata_jsonl_path}"
)
return self