merge main
Browse files- .container/Dockerfile +1 -1
- .container/docker-compose.yml +9 -3
- README.md +31 -27
- README_zh.md +31 -26
- examples/run.py +5 -1
- examples/run_azure_openai.py +6 -2
- examples/run_deepseek_zh.py +7 -6
- examples/run_gaia_roleplaying.py +6 -2
- examples/run_mcp.py +5 -1
- examples/run_mini.py +6 -1
- examples/run_ollama.py +6 -2
- examples/run_openai_compatiable_model.py +6 -2
- examples/run_qwen_mini_zh.py +7 -3
- examples/run_qwen_zh.py +8 -2
- examples/run_terminal.py +6 -3
- examples/run_terminal_zh.py +5 -4
- owl/webapp.py +2 -2
.container/Dockerfile
CHANGED
@@ -16,7 +16,7 @@ WORKDIR /app
|
|
16 |
# 安装系统依赖(合并为一个RUN命令减少层数)
|
17 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
18 |
curl git ffmpeg libsm6 libxext6 xvfb xauth x11-utils \
|
19 |
-
|
20 |
&& apt-get clean \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
|
|
16 |
# 安装系统依赖(合并为一个RUN命令减少层数)
|
17 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
18 |
curl git ffmpeg libsm6 libxext6 xvfb xauth x11-utils \
|
19 |
+
build-essential python3-dev \
|
20 |
&& apt-get clean \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
.container/docker-compose.yml
CHANGED
@@ -1,8 +1,14 @@
|
|
1 |
services:
|
2 |
owl:
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
volumes:
|
7 |
# 挂载.env文件,方便配置API密钥
|
8 |
- ../owl/.env:/app/owl/.env
|
|
|
1 |
services:
|
2 |
owl:
|
3 |
+
# Option 1: Use pre-built image from Docker Hub
|
4 |
+
image: mugglejinx/owl:latest
|
5 |
+
|
6 |
+
# Option 2: Build image locally
|
7 |
+
# Uncomment the following lines and comment out the 'image' line above to build locally
|
8 |
+
# build:
|
9 |
+
# context: ..
|
10 |
+
# dockerfile: .container/Dockerfile
|
11 |
+
|
12 |
volumes:
|
13 |
# 挂载.env文件,方便配置API密钥
|
14 |
- ../owl/.env:/app/owl/.env
|
README.md
CHANGED
@@ -64,15 +64,11 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
|
|
64 |
- [📋 Table of Contents](#-table-of-contents)
|
65 |
- [🔥 News](#-news)
|
66 |
- [🎬 Demo Video](#-demo-video)
|
67 |
-
- [✨️ Core Features](
|
68 |
- [🛠️ Installation](#️-installation)
|
69 |
-
- [**Clone the Github repository**](#clone-the-github-repository)
|
70 |
-
- [**Set up Environment**](#set-up-environment)
|
71 |
-
- [**Install Dependencies**](#install-dependencies)
|
72 |
-
- [**Setup Environment Variables**](#setup-environment-variables)
|
73 |
-
- [**Running with Docker**](#running-with-docker)
|
74 |
- [🚀 Quick Start](#-quick-start)
|
75 |
- [🧰 Toolkits and Capabilities](#-toolkits-and-capabilities)
|
|
|
76 |
- [🌐 Web Interface](#-web-interface)
|
77 |
- [🧪 Experiments](#-experiments)
|
78 |
- [⏱️ Future Plans](#️-future-plans)
|
@@ -84,7 +80,6 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
|
|
84 |
- [📚 Exploring CAMEL Dependency](#-exploring-camel-dependency)
|
85 |
- [⭐ Star History](#-star-history)
|
86 |
|
87 |
-
|
88 |
# 🔥 News
|
89 |
|
90 |
|
@@ -104,7 +99,20 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
|
|
104 |
</p>
|
105 |
</div>
|
106 |
|
107 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
- **[2025.03.12]**: Added Bocha search in SearchToolkit, integrated Volcano Engine model platform, and enhanced Azure and OpenAI Compatible models with structured output and tool calling.
|
109 |
- **[2025.03.11]**: We added MCPToolkit, FileWriteToolkit, and TerminalToolkit to enhance OWL agents with MCP tool calling, file writing capabilities, and terminal command execution.
|
110 |
- **[2025.03.09]**: We added a web-based user interface that makes it easier to interact with the system.
|
@@ -261,8 +269,8 @@ cd owl
|
|
261 |
cp owl/.env_template owl/.env
|
262 |
# Edit the .env file and fill in your API keys
|
263 |
|
264 |
-
|
265 |
# Option 1: Using docker-compose directly
|
|
|
266 |
cd .container
|
267 |
|
268 |
docker-compose up -d
|
@@ -290,21 +298,6 @@ For more detailed Docker usage instructions, including cross-platform support, o
|
|
290 |
|
291 |
# 🚀 Quick Start
|
292 |
|
293 |
-
## Try MCP (Model Context Protocol) Integration
|
294 |
-
|
295 |
-
Experience the power of MCP by running our example that demonstrates multi-agent information retrieval and processing:
|
296 |
-
|
297 |
-
```bash
|
298 |
-
# Set up MCP servers (one-time setup)
|
299 |
-
npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude
|
300 |
-
npx @wonderwhy-er/desktop-commander setup
|
301 |
-
|
302 |
-
# Run the MCP example
|
303 |
-
python examples/run_mcp.py
|
304 |
-
```
|
305 |
-
|
306 |
-
This example showcases how OWL agents can seamlessly interact with file systems, web automation, and information retrieval through the MCP protocol. Check out `examples/run_mcp.py` for the full implementation.
|
307 |
-
|
308 |
## Basic Usage
|
309 |
|
310 |
After installation and setting up your environment variables, you can start using OWL right away:
|
@@ -413,6 +406,8 @@ tools = [
|
|
413 |
SearchToolkit().search_duckduckgo,
|
414 |
SearchToolkit().search_google, # Comment out if unavailable
|
415 |
SearchToolkit().search_wiki,
|
|
|
|
|
416 |
*ExcelToolkit().get_tools(),
|
417 |
*DocumentProcessingToolkit(model=models["document"]).get_tools(),
|
418 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
@@ -459,7 +454,15 @@ Selecting only necessary toolkits optimizes performance and reduces resource usa
|
|
459 |
|
460 |
# 🌐 Web Interface
|
461 |
|
462 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
|
464 |
## Starting the Web UI
|
465 |
|
@@ -533,7 +536,8 @@ We welcome contributions from the community! Here's how you can help:
|
|
533 |
3. Submit pull requests with your improvements
|
534 |
|
535 |
**Current Issues Open for Contribution:**
|
536 |
-
- [#
|
|
|
537 |
- [#1770](https://github.com/camel-ai/camel/issues/1770)
|
538 |
- [#1712](https://github.com/camel-ai/camel/issues/1712)
|
539 |
- [#1537](https://github.com/camel-ai/camel/issues/1537)
|
@@ -546,7 +550,7 @@ Join us ([*Discord*](https://discord.camel-ai.org/) or [*WeChat*](https://ghli.o
|
|
546 |
|
547 |
Join us for further discussions!
|
548 |
<!--  -->
|
549 |
-

|
65 |
- [🔥 News](#-news)
|
66 |
- [🎬 Demo Video](#-demo-video)
|
67 |
+
- [✨️ Core Features](#️-core-features)
|
68 |
- [🛠️ Installation](#️-installation)
|
|
|
|
|
|
|
|
|
|
|
69 |
- [🚀 Quick Start](#-quick-start)
|
70 |
- [🧰 Toolkits and Capabilities](#-toolkits-and-capabilities)
|
71 |
+
- [Model Context Protocol (MCP)](#model-context-protocol-mcp)
|
72 |
- [🌐 Web Interface](#-web-interface)
|
73 |
- [🧪 Experiments](#-experiments)
|
74 |
- [⏱️ Future Plans](#️-future-plans)
|
|
|
80 |
- [📚 Exploring CAMEL Dependency](#-exploring-camel-dependency)
|
81 |
- [⭐ Star History](#-star-history)
|
82 |
|
|
|
83 |
# 🔥 News
|
84 |
|
85 |
|
|
|
99 |
</p>
|
100 |
</div>
|
101 |
|
102 |
+
<div style="background-color: #e3f2fd; padding: 12px; border-radius: 8px; border-left: 4px solid #1e88e5; margin: 10px 0;">
|
103 |
+
<h4 style="color: #1e88e5; margin: 0 0 8px 0;">
|
104 |
+
🎉 Latest Major Update - March 15, 2025
|
105 |
+
</h4>
|
106 |
+
<p style="margin: 0;">
|
107 |
+
<b>Significant Improvements:</b>
|
108 |
+
<ul style="margin: 5px 0 0 0; padding-left: 20px;">
|
109 |
+
<li>Restructured web-based UI architecture for enhanced stability 🏗️</li>
|
110 |
+
<li>Optimized OWL Agent execution mechanisms for better performance 🚀</li>
|
111 |
+
</ul>
|
112 |
+
<i>Try it now and experience the improved performance in your automation tasks!</i>
|
113 |
+
</p>
|
114 |
+
</div>
|
115 |
+
|
116 |
- **[2025.03.12]**: Added Bocha search in SearchToolkit, integrated Volcano Engine model platform, and enhanced Azure and OpenAI Compatible models with structured output and tool calling.
|
117 |
- **[2025.03.11]**: We added MCPToolkit, FileWriteToolkit, and TerminalToolkit to enhance OWL agents with MCP tool calling, file writing capabilities, and terminal command execution.
|
118 |
- **[2025.03.09]**: We added a web-based user interface that makes it easier to interact with the system.
|
|
|
269 |
cp owl/.env_template owl/.env
|
270 |
# Edit the .env file and fill in your API keys
|
271 |
|
|
|
272 |
# Option 1: Using docker-compose directly
|
273 |
+
# (By default it's using pre-built online image, you can also check the docker-compose.yml for building locally)
|
274 |
cd .container
|
275 |
|
276 |
docker-compose up -d
|
|
|
298 |
|
299 |
# 🚀 Quick Start
|
300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
## Basic Usage
|
302 |
|
303 |
After installation and setting up your environment variables, you can start using OWL right away:
|
|
|
406 |
SearchToolkit().search_duckduckgo,
|
407 |
SearchToolkit().search_google, # Comment out if unavailable
|
408 |
SearchToolkit().search_wiki,
|
409 |
+
SearchToolkit().search_bocha,
|
410 |
+
SearchToolkit().search_baidu,
|
411 |
*ExcelToolkit().get_tools(),
|
412 |
*DocumentProcessingToolkit(model=models["document"]).get_tools(),
|
413 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
|
|
454 |
|
455 |
# 🌐 Web Interface
|
456 |
|
457 |
+
<div align="center" style="background-color: #f0f7ff; padding: 15px; border-radius: 10px; border: 2px solid #1e88e5; margin: 20px 0;">
|
458 |
+
<h3 style="color: #1e88e5; margin: 0;">
|
459 |
+
🚀 Enhanced Web Interface Now Available!
|
460 |
+
</h3>
|
461 |
+
<p style="margin: 10px 0;">
|
462 |
+
Experience improved system stability and optimized performance with our latest update.
|
463 |
+
Start exploring the power of OWL through our user-friendly interface!
|
464 |
+
</p>
|
465 |
+
</div>
|
466 |
|
467 |
## Starting the Web UI
|
468 |
|
|
|
536 |
3. Submit pull requests with your improvements
|
537 |
|
538 |
**Current Issues Open for Contribution:**
|
539 |
+
- [#1868](https://github.com/camel-ai/camel/issues/1868)
|
540 |
+
- [#1866](https://github.com/camel-ai/camel/issues/1866)
|
541 |
- [#1770](https://github.com/camel-ai/camel/issues/1770)
|
542 |
- [#1712](https://github.com/camel-ai/camel/issues/1712)
|
543 |
- [#1537](https://github.com/camel-ai/camel/issues/1537)
|
|
|
550 |
|
551 |
Join us for further discussions!
|
552 |
<!--  -->
|
553 |
+

|
554 |
|
555 |
# ❓ FAQ
|
556 |
|
README_zh.md
CHANGED
@@ -67,13 +67,9 @@
|
|
67 |
- [🎬 演示视频](#-演示视频)
|
68 |
- [✨️ 核心功能](#-核心功能)
|
69 |
- [🛠️ 安装](#️-安装)
|
70 |
-
- [**选项1:使用 uv(推荐)**](#选项1使用-uv推荐)
|
71 |
-
- [**选项2:使用 venv 和 pip**](#选项2使用-venv-和-pip)
|
72 |
-
- [**选项3:使用 conda**](#选项3使用-conda)
|
73 |
-
- [**设置环境变量**](#设置环境变量)
|
74 |
-
- [**使用Docker运行**](#使用docker运行)
|
75 |
- [🚀 快速开始](#-快速开始)
|
76 |
- [🧰 工具包与功能](#-工具包与功能)
|
|
|
77 |
- [🌐 网页界面](#-网页界面)
|
78 |
- [🧪 实验](#-实验)
|
79 |
- [⏱️ 未来计划](#️-未来计划)
|
@@ -85,7 +81,6 @@
|
|
85 |
- [📚 探索 CAMEL 依赖](#-探索-camel-依赖)
|
86 |
- [⭐ Star History](#-star-history)
|
87 |
|
88 |
-
|
89 |
# 🔥 新闻
|
90 |
|
91 |
<div align="center" style="background-color: #fffacd; padding: 15px; border-radius: 10px; border: 2px solid #ffd700; margin: 20px 0;">
|
@@ -104,7 +99,20 @@
|
|
104 |
</p>
|
105 |
</div>
|
106 |
|
107 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
- **[2025.03.12]**: 在SearchToolkit中添加了Bocha搜索功能,集成了火山引擎模型平台,并更新了Azure和OpenAI Compatible模型的结构化输出和工具调用能力。
|
109 |
- **[2025.03.11]**: 我们添加了 MCPToolkit、FileWriteToolkit 和 TerminalToolkit,增强了 OWL Agent 的 MCP(模型上下文协议)集成、文件写入能力和终端命令执行功能。MCP 作为一个通用协议层,标准化了 AI 模型与各种数据源和工具的交互方式。
|
110 |
- **[2025.03.09]**: 我们添加了基于网页的用户界面,使系统交互变得更加简便。
|
@@ -284,21 +292,6 @@ chmod +x build_docker.sh
|
|
284 |
|
285 |
# 🚀 快速开始
|
286 |
|
287 |
-
## 尝试 MCP(模型上下文协议)集成
|
288 |
-
|
289 |
-
体验 MCP 的强大功能,运行我们的示例来展示多智能体信息检索和处理:
|
290 |
-
|
291 |
-
```bash
|
292 |
-
# 设置 MCP 服务器(仅需一次性设置)
|
293 |
-
npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude
|
294 |
-
npx @wonderwhy-er/desktop-commander setup
|
295 |
-
|
296 |
-
# 运行 MCP 示例
|
297 |
-
python examples/run_mcp.py
|
298 |
-
```
|
299 |
-
|
300 |
-
这个示例展示了 OWL 智能体如何通过 MCP 协议无缝地与文件系统、网页自动化和信息检索进行交互。查看 `examples/run_mcp.py` 了解完整实现。
|
301 |
-
|
302 |
## 基本用法
|
303 |
|
304 |
运行以下示例:
|
@@ -403,6 +396,8 @@ tools = [
|
|
403 |
SearchToolkit().search_duckduckgo,
|
404 |
SearchToolkit().search_google, # 如果不可用请注释
|
405 |
SearchToolkit().search_wiki,
|
|
|
|
|
406 |
*ExcelToolkit().get_tools(),
|
407 |
*DocumentProcessingToolkit(model=models["document"]).get_tools(),
|
408 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
@@ -449,6 +444,16 @@ assistant_agent_kwargs = {"model": models["assistant"], "tools": tools}
|
|
449 |
|
450 |
# 🌐 网页界面
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
OWL 现在包含一个基于网页的用户界面,使与系统交互变得更加容易。要启动网页界面,请运行:
|
453 |
|
454 |
```bash
|
@@ -520,7 +525,8 @@ python examples/run_gaia_roleplaying.py
|
|
520 |
3. 提交包含您改进的拉取请求
|
521 |
|
522 |
**当前开放贡献的问题:**
|
523 |
-
- [#
|
|
|
524 |
- [#1770](https://github.com/camel-ai/camel/issues/1770)
|
525 |
- [#1712](https://github.com/camel-ai/camel/issues/1712)
|
526 |
- [#1537](https://github.com/camel-ai/camel/issues/1537)
|
@@ -531,9 +537,8 @@ python examples/run_gaia_roleplaying.py
|
|
531 |
加入我们的 ([*Discord*](https://discord.camel-ai.org/) 或 [*微信*](https://ghli.org/camel/wechat.png)) 社区,一起探索智能体扩展规律的边界。
|
532 |
|
533 |
加入我们,参与更多讨论!
|
534 |
-
|
535 |
-
 -->
|
537 |
|
538 |
# ❓ 常见问题
|
539 |
|
|
|
67 |
- [🎬 演示视频](#-演示视频)
|
68 |
- [✨️ 核心功能](#-核心功能)
|
69 |
- [🛠️ 安装](#️-安装)
|
|
|
|
|
|
|
|
|
|
|
70 |
- [🚀 快速开始](#-快速开始)
|
71 |
- [🧰 工具包与功能](#-工具包与功能)
|
72 |
+
- [模型上下文协议 (MCP)](#模型上下文协议-mcp)
|
73 |
- [🌐 网页界面](#-网页界面)
|
74 |
- [🧪 实验](#-实验)
|
75 |
- [⏱️ 未来计划](#️-未来计划)
|
|
|
81 |
- [📚 探索 CAMEL 依赖](#-探索-camel-依赖)
|
82 |
- [⭐ Star History](#-star-history)
|
83 |
|
|
|
84 |
# 🔥 新闻
|
85 |
|
86 |
<div align="center" style="background-color: #fffacd; padding: 15px; border-radius: 10px; border: 2px solid #ffd700; margin: 20px 0;">
|
|
|
99 |
</p>
|
100 |
</div>
|
101 |
|
102 |
+
<div style="background-color: #e3f2fd; padding: 12px; border-radius: 8px; border-left: 4px solid #1e88e5; margin: 10px 0;">
|
103 |
+
<h4 style="color: #1e88e5; margin: 0 0 8px 0;">
|
104 |
+
🎉 最新重大更新 - 2025年3月15日
|
105 |
+
</h4>
|
106 |
+
<p style="margin: 0;">
|
107 |
+
<b>重要改进:</b>
|
108 |
+
<ul style="margin: 5px 0 0 0; padding-left: 20px;">
|
109 |
+
<li>重构网页用户界面架构,显著提升系统稳定性 🏗️</li>
|
110 |
+
<li>优化OWL Agent执行机制,大幅提升性能与效率 🚀</li>
|
111 |
+
</ul>
|
112 |
+
<i>立即体验全新升级的自动化任务处理能力!</i>
|
113 |
+
</p>
|
114 |
+
</div>
|
115 |
+
|
116 |
- **[2025.03.12]**: 在SearchToolkit中添加了Bocha搜索功能,集成了火山引擎模型平台,并更新了Azure和OpenAI Compatible模型的结构化输出和工具调用能力。
|
117 |
- **[2025.03.11]**: 我们添加了 MCPToolkit、FileWriteToolkit 和 TerminalToolkit,增强了 OWL Agent 的 MCP(模型上下文协议)集成、文件写入能力和终端命令执行功能。MCP 作为一个通用协议层,标准化了 AI 模型与各种数据源和工具的交互方式。
|
118 |
- **[2025.03.09]**: 我们添加了基于网页的用户界面,使系统交互变得更加简便。
|
|
|
292 |
|
293 |
# 🚀 快速开始
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
## 基本用法
|
296 |
|
297 |
运行以下示例:
|
|
|
396 |
SearchToolkit().search_duckduckgo,
|
397 |
SearchToolkit().search_google, # 如果不可用请注释
|
398 |
SearchToolkit().search_wiki,
|
399 |
+
SearchToolkit().search_bocha,
|
400 |
+
SearchToolkit().search_baidu,
|
401 |
*ExcelToolkit().get_tools(),
|
402 |
*DocumentProcessingToolkit(model=models["document"]).get_tools(),
|
403 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
|
|
444 |
|
445 |
# 🌐 网页界面
|
446 |
|
447 |
+
<div align="center" style="background-color: #f0f7ff; padding: 15px; border-radius: 10px; border: 2px solid #1e88e5; margin: 20px 0;">
|
448 |
+
<h3 style="color: #1e88e5; margin: 0;">
|
449 |
+
🚀 全新升级的网页界面现已发布!
|
450 |
+
</h3>
|
451 |
+
<p style="margin: 10px 0;">
|
452 |
+
体验更稳定的系统性能和优化后的执行效率。
|
453 |
+
通过我们直观的界面,开启OWL强大功能的探索之旅!
|
454 |
+
</p>
|
455 |
+
</div>
|
456 |
+
|
457 |
OWL 现在包含一个基于网页的用户界面,使与系统交互变得更加容易。要启动网页界面,请运行:
|
458 |
|
459 |
```bash
|
|
|
525 |
3. 提交包含您改进的拉取请求
|
526 |
|
527 |
**当前开放贡献的问题:**
|
528 |
+
- [#1868](https://github.com/camel-ai/camel/issues/1868)
|
529 |
+
- [#1866](https://github.com/camel-ai/camel/issues/1866)
|
530 |
- [#1770](https://github.com/camel-ai/camel/issues/1770)
|
531 |
- [#1712](https://github.com/camel-ai/camel/issues/1712)
|
532 |
- [#1537](https://github.com/camel-ai/camel/issues/1537)
|
|
|
537 |
加入我们的 ([*Discord*](https://discord.camel-ai.org/) 或 [*微信*](https://ghli.org/camel/wechat.png)) 社区,一起探索智能体扩展规律的边界。
|
538 |
|
539 |
加入我们,参与更多讨论!
|
540 |
+
|
541 |
+

|
|
|
542 |
|
543 |
# ❓ 常见问题
|
544 |
|
examples/run.py
CHANGED
@@ -29,7 +29,11 @@ from camel.societies import RolePlaying
|
|
29 |
|
30 |
from owl.utils import run_society, DocumentProcessingToolkit
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
set_log_level(level="DEBUG")
|
35 |
|
|
|
29 |
|
30 |
from owl.utils import run_society, DocumentProcessingToolkit
|
31 |
|
32 |
+
import pathlib
|
33 |
+
|
34 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
35 |
+
env_path = base_dir / "owl" / ".env"
|
36 |
+
load_dotenv(dotenv_path=str(env_path))
|
37 |
|
38 |
set_log_level(level="DEBUG")
|
39 |
|
examples/run_azure_openai.py
CHANGED
@@ -29,9 +29,13 @@ from owl.utils import OwlRolePlaying, run_society
|
|
29 |
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
|
36 |
|
37 |
def construct_society(question: str) -> OwlRolePlaying:
|
|
|
29 |
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
+
import pathlib
|
33 |
+
|
34 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
35 |
+
env_path = base_dir / "owl" / ".env"
|
36 |
+
load_dotenv(dotenv_path=str(env_path))
|
37 |
|
38 |
+
set_log_level(level="DEBUG")
|
39 |
|
40 |
|
41 |
def construct_society(question: str) -> OwlRolePlaying:
|
examples/run_deepseek_zh.py
CHANGED
@@ -20,7 +20,6 @@
|
|
20 |
|
21 |
from dotenv import load_dotenv
|
22 |
|
23 |
-
|
24 |
from camel.models import ModelFactory
|
25 |
from camel.toolkits import (
|
26 |
ExcelToolkit,
|
@@ -29,17 +28,18 @@ from camel.toolkits import (
|
|
29 |
CodeExecutionToolkit,
|
30 |
)
|
31 |
from camel.types import ModelPlatformType, ModelType
|
32 |
-
|
|
|
33 |
|
34 |
from owl.utils import run_society
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
from camel.logger import set_log_level
|
39 |
|
40 |
set_log_level(level="DEBUG")
|
41 |
|
42 |
-
|
|
|
|
|
43 |
|
44 |
|
45 |
def construct_society(question: str) -> RolePlaying:
|
@@ -71,6 +71,7 @@ def construct_society(question: str) -> RolePlaying:
|
|
71 |
*CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(),
|
72 |
SearchToolkit().search_duckduckgo,
|
73 |
SearchToolkit().search_wiki,
|
|
|
74 |
*ExcelToolkit().get_tools(),
|
75 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
76 |
]
|
|
|
20 |
|
21 |
from dotenv import load_dotenv
|
22 |
|
|
|
23 |
from camel.models import ModelFactory
|
24 |
from camel.toolkits import (
|
25 |
ExcelToolkit,
|
|
|
28 |
CodeExecutionToolkit,
|
29 |
)
|
30 |
from camel.types import ModelPlatformType, ModelType
|
31 |
+
from camel.societies import RolePlaying
|
32 |
+
from camel.logger import set_log_level
|
33 |
|
34 |
from owl.utils import run_society
|
35 |
|
36 |
+
import pathlib
|
|
|
|
|
37 |
|
38 |
set_log_level(level="DEBUG")
|
39 |
|
40 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
41 |
+
env_path = base_dir / "owl" / ".env"
|
42 |
+
load_dotenv(dotenv_path=str(env_path))
|
43 |
|
44 |
|
45 |
def construct_society(question: str) -> RolePlaying:
|
|
|
71 |
*CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(),
|
72 |
SearchToolkit().search_duckduckgo,
|
73 |
SearchToolkit().search_wiki,
|
74 |
+
SearchToolkit().search_baidu,
|
75 |
*ExcelToolkit().get_tools(),
|
76 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
77 |
]
|
examples/run_gaia_roleplaying.py
CHANGED
@@ -35,9 +35,13 @@ from camel.configs import ChatGPTConfig
|
|
35 |
from owl.utils import GAIABenchmark
|
36 |
from camel.logger import set_log_level
|
37 |
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
|
42 |
logger = get_logger(__name__)
|
43 |
|
|
|
35 |
from owl.utils import GAIABenchmark
|
36 |
from camel.logger import set_log_level
|
37 |
|
38 |
+
import pathlib
|
39 |
+
|
40 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
41 |
+
env_path = base_dir / "owl" / ".env"
|
42 |
+
load_dotenv(dotenv_path=str(env_path))
|
43 |
|
44 |
+
set_log_level(level="DEBUG")
|
45 |
|
46 |
logger = get_logger(__name__)
|
47 |
|
examples/run_mcp.py
CHANGED
@@ -104,8 +104,12 @@ from camel.toolkits import MCPToolkit
|
|
104 |
|
105 |
from owl.utils.enhanced_role_playing import OwlRolePlaying, arun_society
|
106 |
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
-
load_dotenv()
|
109 |
set_log_level(level="DEBUG")
|
110 |
|
111 |
|
|
|
104 |
|
105 |
from owl.utils.enhanced_role_playing import OwlRolePlaying, arun_society
|
106 |
|
107 |
+
import pathlib
|
108 |
+
|
109 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
110 |
+
env_path = base_dir / "owl" / ".env"
|
111 |
+
load_dotenv(dotenv_path=str(env_path))
|
112 |
|
|
|
113 |
set_log_level(level="DEBUG")
|
114 |
|
115 |
|
examples/run_mini.py
CHANGED
@@ -26,7 +26,12 @@ from owl.utils import run_society
|
|
26 |
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
set_log_level(level="DEBUG")
|
31 |
|
32 |
|
|
|
26 |
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
+
import pathlib
|
30 |
+
|
31 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
32 |
+
env_path = base_dir / "owl" / ".env"
|
33 |
+
load_dotenv(dotenv_path=str(env_path))
|
34 |
+
|
35 |
set_log_level(level="DEBUG")
|
36 |
|
37 |
|
examples/run_ollama.py
CHANGED
@@ -31,9 +31,13 @@ from camel.societies import RolePlaying
|
|
31 |
|
32 |
from camel.logger import set_log_level
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
|
39 |
def construct_society(question: str) -> RolePlaying:
|
|
|
31 |
|
32 |
from camel.logger import set_log_level
|
33 |
|
34 |
+
import pathlib
|
35 |
+
|
36 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
37 |
+
env_path = base_dir / "owl" / ".env"
|
38 |
+
load_dotenv(dotenv_path=str(env_path))
|
39 |
|
40 |
+
set_log_level(level="DEBUG")
|
41 |
|
42 |
|
43 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_openai_compatiable_model.py
CHANGED
@@ -29,9 +29,13 @@ from owl.utils import run_society
|
|
29 |
from camel.societies import RolePlaying
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
|
36 |
|
37 |
def construct_society(question: str) -> RolePlaying:
|
|
|
29 |
from camel.societies import RolePlaying
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
+
import pathlib
|
33 |
+
|
34 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
35 |
+
env_path = base_dir / "owl" / ".env"
|
36 |
+
load_dotenv(dotenv_path=str(env_path))
|
37 |
|
38 |
+
set_log_level(level="DEBUG")
|
39 |
|
40 |
|
41 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_qwen_mini_zh.py
CHANGED
@@ -28,9 +28,13 @@ from camel.societies import RolePlaying
|
|
28 |
|
29 |
from camel.logger import set_log_level
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
|
34 |
|
35 |
|
36 |
def construct_society(question: str) -> RolePlaying:
|
@@ -70,7 +74,7 @@ def construct_society(question: str) -> RolePlaying:
|
|
70 |
planning_agent_model=planning_model,
|
71 |
output_language="Chinese",
|
72 |
).get_tools(),
|
73 |
-
SearchToolkit().
|
74 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
75 |
]
|
76 |
|
|
|
28 |
|
29 |
from camel.logger import set_log_level
|
30 |
|
31 |
+
import pathlib
|
32 |
+
|
33 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
34 |
+
env_path = base_dir / "owl" / ".env"
|
35 |
+
load_dotenv(dotenv_path=str(env_path))
|
36 |
|
37 |
+
set_log_level(level="DEBUG")
|
38 |
|
39 |
|
40 |
def construct_society(question: str) -> RolePlaying:
|
|
|
74 |
planning_agent_model=planning_model,
|
75 |
output_language="Chinese",
|
76 |
).get_tools(),
|
77 |
+
SearchToolkit().search_baidu,
|
78 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
79 |
]
|
80 |
|
examples/run_qwen_zh.py
CHANGED
@@ -34,9 +34,14 @@ from owl.utils import run_society, DocumentProcessingToolkit
|
|
34 |
|
35 |
from camel.logger import set_log_level
|
36 |
|
37 |
-
set_log_level(level="DEBUG")
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
|
42 |
def construct_society(question: str) -> RolePlaying:
|
@@ -103,6 +108,7 @@ def construct_society(question: str) -> RolePlaying:
|
|
103 |
SearchToolkit().search_duckduckgo,
|
104 |
SearchToolkit().search_google, # Comment this out if you don't have google search
|
105 |
SearchToolkit().search_wiki,
|
|
|
106 |
*ExcelToolkit().get_tools(),
|
107 |
*DocumentProcessingToolkit(model=models["document"]).get_tools(),
|
108 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
|
|
34 |
|
35 |
from camel.logger import set_log_level
|
36 |
|
|
|
37 |
|
38 |
+
import pathlib
|
39 |
+
|
40 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
41 |
+
env_path = base_dir / "owl" / ".env"
|
42 |
+
load_dotenv(dotenv_path=str(env_path))
|
43 |
+
|
44 |
+
set_log_level(level="DEBUG")
|
45 |
|
46 |
|
47 |
def construct_society(question: str) -> RolePlaying:
|
|
|
108 |
SearchToolkit().search_duckduckgo,
|
109 |
SearchToolkit().search_google, # Comment this out if you don't have google search
|
110 |
SearchToolkit().search_wiki,
|
111 |
+
SearchToolkit().search_baidu,
|
112 |
*ExcelToolkit().get_tools(),
|
113 |
*DocumentProcessingToolkit(model=models["document"]).get_tools(),
|
114 |
*FileWriteToolkit(output_dir="./").get_tools(),
|
examples/run_terminal.py
CHANGED
@@ -26,10 +26,13 @@ from camel.logger import set_log_level
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
set_log_level(level="DEBUG")
|
31 |
-
# Get current script directory
|
32 |
-
base_dir = os.path.dirname(os.path.abspath(__file__))
|
33 |
|
34 |
|
35 |
def construct_society(question: str) -> RolePlaying:
|
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
+
import pathlib
|
30 |
+
|
31 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
32 |
+
env_path = base_dir / "owl" / ".env"
|
33 |
+
load_dotenv(dotenv_path=str(env_path))
|
34 |
+
|
35 |
set_log_level(level="DEBUG")
|
|
|
|
|
36 |
|
37 |
|
38 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_terminal_zh.py
CHANGED
@@ -26,12 +26,13 @@ from camel.logger import set_log_level
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
-
|
30 |
-
set_log_level(level="DEBUG")
|
31 |
|
|
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
base_dir = os.path.dirname(os.path.abspath(__file__))
|
35 |
|
36 |
|
37 |
def construct_society(question: str) -> RolePlaying:
|
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
+
import pathlib
|
|
|
30 |
|
31 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
32 |
+
env_path = base_dir / "owl" / ".env"
|
33 |
+
load_dotenv(dotenv_path=str(env_path))
|
34 |
|
35 |
+
set_log_level(level="DEBUG")
|
|
|
36 |
|
37 |
|
38 |
def construct_society(question: str) -> RolePlaying:
|
owl/webapp.py
CHANGED
@@ -1070,7 +1070,7 @@ def create_ui():
|
|
1070 |
label="Question",
|
1071 |
elem_id="question_input",
|
1072 |
show_copy_button=True,
|
1073 |
-
value="Open
|
1074 |
)
|
1075 |
|
1076 |
# Enhanced module selection dropdown
|
@@ -1212,7 +1212,7 @@ def create_ui():
|
|
1212 |
|
1213 |
# Example questions
|
1214 |
examples = [
|
1215 |
-
"Open
|
1216 |
"Browse Amazon and find a product that is attractive to programmers. Please provide the product name and price",
|
1217 |
"Write a hello world python file and save it locally",
|
1218 |
]
|
|
|
1070 |
label="Question",
|
1071 |
elem_id="question_input",
|
1072 |
show_copy_button=True,
|
1073 |
+
value="Open Google 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.",
|
1074 |
)
|
1075 |
|
1076 |
# Enhanced module selection dropdown
|
|
|
1212 |
|
1213 |
# Example questions
|
1214 |
examples = [
|
1215 |
+
"Open Google 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.",
|
1216 |
"Browse Amazon and find a product that is attractive to programmers. Please provide the product name and price",
|
1217 |
"Write a hello world python file and save it locally",
|
1218 |
]
|