some docs fix
Browse files- README.md +2 -1
- README_zh.md +1 -0
- owl/run_qwq_demo.py +0 -92
README.md
CHANGED
@@ -70,7 +70,8 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas
|
|
70 |
- [**Set up Environment**](#set-up-environment)
|
71 |
- [**Install Dependencies**](#install-dependencies)
|
72 |
- [**Setup Environment Variables**](#setup-environment-variables)
|
73 |
-
- [
|
|
|
74 |
- [🚀 Quick Start](#-quick-start)
|
75 |
- [🧪 Experiments](#-experiments)
|
76 |
- [⏱️ Future Plans](#️-future-plans)
|
|
|
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 |
+
|
75 |
- [🚀 Quick Start](#-quick-start)
|
76 |
- [🧪 Experiments](#-experiments)
|
77 |
- [⏱️ Future Plans](#️-future-plans)
|
README_zh.md
CHANGED
@@ -71,6 +71,7 @@
|
|
71 |
- [**设置环境**](#设置环境)
|
72 |
- [**安装依赖**](#安装依赖)
|
73 |
- [**设置环境变量**](#设置环境变量)
|
|
|
74 |
- [🚀 快速开始](#-快速开始)
|
75 |
- [🧪 实验](#-实验)
|
76 |
- [⏱️ 未来计划](#️-未来计划)
|
|
|
71 |
- [**设置环境**](#设置环境)
|
72 |
- [**安装依赖**](#安装依赖)
|
73 |
- [**设置环境变量**](#设置环境变量)
|
74 |
+
- [**使用Docker运行**](#使用docker运行)
|
75 |
- [🚀 快速开始](#-快速开始)
|
76 |
- [🧪 实验](#-实验)
|
77 |
- [⏱️ 未来计划](#️-未来计划)
|
owl/run_qwq_demo.py
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
|
2 |
-
from dotenv import load_dotenv
|
3 |
-
load_dotenv()
|
4 |
-
|
5 |
-
from camel.models import ModelFactory
|
6 |
-
from camel.toolkits import *
|
7 |
-
from camel.types import ModelPlatformType, ModelType
|
8 |
-
from camel.configs import ChatGPTConfig
|
9 |
-
|
10 |
-
from typing import List, Dict
|
11 |
-
|
12 |
-
from retry import retry
|
13 |
-
from loguru import logger
|
14 |
-
|
15 |
-
from utils import OwlRolePlaying, run_society
|
16 |
-
import os
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
def construct_society(question: str) -> OwlRolePlaying:
|
22 |
-
r"""Construct the society based on the question."""
|
23 |
-
|
24 |
-
user_role_name = "user"
|
25 |
-
assistant_role_name = "assistant"
|
26 |
-
|
27 |
-
user_model = ModelFactory.create(
|
28 |
-
model_platform=ModelPlatformType.OPENAI_COMPATIBLE_MODEL,
|
29 |
-
model_type="qwq-32b",
|
30 |
-
api_key=os.getenv("QWEN_API_KEY"),
|
31 |
-
url="https://dashscope.aliyuncs.com/compatible-mode/v1",
|
32 |
-
model_config_dict={"temperature": 0.4, "max_tokens": 4096},
|
33 |
-
)
|
34 |
-
|
35 |
-
assistant_model = ModelFactory.create(
|
36 |
-
model_platform=ModelPlatformType.OPENAI_COMPATIBLE_MODEL,
|
37 |
-
model_type="qwq-32b",
|
38 |
-
api_key=os.getenv("QWEN_API_KEY"),
|
39 |
-
url="https://dashscope.aliyuncs.com/compatible-mode/v1",
|
40 |
-
model_config_dict={"temperature": 0.4, "max_tokens": 4096},
|
41 |
-
)
|
42 |
-
|
43 |
-
|
44 |
-
tools_list = [
|
45 |
-
*WebToolkit(
|
46 |
-
headless=False,
|
47 |
-
web_agent_model=assistant_model,
|
48 |
-
planning_agent_model=assistant_model
|
49 |
-
).get_tools(),
|
50 |
-
*DocumentProcessingToolkit().get_tools(),
|
51 |
-
*VideoAnalysisToolkit(model=assistant_model).get_tools(), # This requires OpenAI Key
|
52 |
-
*AudioAnalysisToolkit().get_tools(), # This requires OpenAI Key
|
53 |
-
*CodeExecutionToolkit().get_tools(),
|
54 |
-
*ImageAnalysisToolkit(model=assistant_model).get_tools(),
|
55 |
-
*SearchToolkit(model=assistant_model).get_tools(),
|
56 |
-
*ExcelToolkit().get_tools()
|
57 |
-
]
|
58 |
-
|
59 |
-
user_role_name = 'user'
|
60 |
-
user_agent_kwargs = dict(model=user_model)
|
61 |
-
assistant_role_name = 'assistant'
|
62 |
-
assistant_agent_kwargs = dict(model=assistant_model,
|
63 |
-
tools=tools_list)
|
64 |
-
|
65 |
-
task_kwargs = {
|
66 |
-
'task_prompt': question,
|
67 |
-
'with_task_specify': False,
|
68 |
-
}
|
69 |
-
|
70 |
-
society = OwlRolePlaying(
|
71 |
-
**task_kwargs,
|
72 |
-
user_role_name=user_role_name,
|
73 |
-
user_agent_kwargs=user_agent_kwargs,
|
74 |
-
assistant_role_name=assistant_role_name,
|
75 |
-
assistant_agent_kwargs=assistant_agent_kwargs,
|
76 |
-
)
|
77 |
-
|
78 |
-
return society
|
79 |
-
|
80 |
-
|
81 |
-
# Example case
|
82 |
-
question = "What was the volume in m^3 of the fish bag that was calculated in the University of Leicester paper `Can Hiccup Supply Enough Fish to Maintain a Dragon’s Diet?` "
|
83 |
-
|
84 |
-
society = construct_society(question)
|
85 |
-
answer, chat_history, token_count = run_society(society)
|
86 |
-
|
87 |
-
logger.success(f"Answer: {answer}")
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|