Commit
·
7a11f89
1
Parent(s):
26aa535
update mcp example
Browse files- owl/run_mcp.py +2 -2
- owl/utils/__init__.py +7 -1
owl/run_mcp.py
CHANGED
@@ -102,7 +102,7 @@ from camel.types import ModelPlatformType, ModelType
|
|
102 |
from camel.logger import set_log_level
|
103 |
from camel.toolkits import MCPToolkit
|
104 |
|
105 |
-
from utils.enhanced_role_playing import OwlRolePlaying,
|
106 |
|
107 |
|
108 |
load_dotenv()
|
@@ -169,7 +169,7 @@ async def main():
|
|
169 |
# Connect to all MCP toolkits
|
170 |
tools = [*mcp_toolkit.get_tools()]
|
171 |
society = await construct_society(question, tools)
|
172 |
-
answer, chat_history, token_count = await
|
173 |
print(f"\033[94mAnswer: {answer}\033[0m")
|
174 |
|
175 |
finally:
|
|
|
102 |
from camel.logger import set_log_level
|
103 |
from camel.toolkits import MCPToolkit
|
104 |
|
105 |
+
from utils.enhanced_role_playing import OwlRolePlaying, arun_society
|
106 |
|
107 |
|
108 |
load_dotenv()
|
|
|
169 |
# Connect to all MCP toolkits
|
170 |
tools = [*mcp_toolkit.get_tools()]
|
171 |
society = await construct_society(question, tools)
|
172 |
+
answer, chat_history, token_count = await arun_society(society)
|
173 |
print(f"\033[94mAnswer: {answer}\033[0m")
|
174 |
|
175 |
finally:
|
owl/utils/__init__.py
CHANGED
@@ -13,7 +13,12 @@
|
|
13 |
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
14 |
|
15 |
from .common import extract_pattern
|
16 |
-
from .enhanced_role_playing import
|
|
|
|
|
|
|
|
|
|
|
17 |
from .gaia import GAIABenchmark
|
18 |
from .document_toolkit import DocumentProcessingToolkit
|
19 |
|
@@ -22,6 +27,7 @@ __all__ = [
|
|
22 |
"OwlRolePlaying",
|
23 |
"OwlGAIARolePlaying",
|
24 |
"run_society",
|
|
|
25 |
"GAIABenchmark",
|
26 |
"DocumentProcessingToolkit",
|
27 |
]
|
|
|
13 |
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
14 |
|
15 |
from .common import extract_pattern
|
16 |
+
from .enhanced_role_playing import (
|
17 |
+
OwlRolePlaying,
|
18 |
+
OwlGAIARolePlaying,
|
19 |
+
run_society,
|
20 |
+
arun_society,
|
21 |
+
)
|
22 |
from .gaia import GAIABenchmark
|
23 |
from .document_toolkit import DocumentProcessingToolkit
|
24 |
|
|
|
27 |
"OwlRolePlaying",
|
28 |
"OwlGAIARolePlaying",
|
29 |
"run_society",
|
30 |
+
"arun_society",
|
31 |
"GAIABenchmark",
|
32 |
"DocumentProcessingToolkit",
|
33 |
]
|