update mcp example

This commit is contained in:
Wendong 2025-03-14 02:36:03 +08:00
parent ab4b9f3515
commit dabac0454a
2 changed files with 9 additions and 3 deletions

View File

@ -102,7 +102,7 @@ from camel.types import ModelPlatformType, ModelType
from camel.logger import set_log_level
from camel.toolkits import MCPToolkit
from utils.enhanced_role_playing import OwlRolePlaying, run_society
from utils.enhanced_role_playing import OwlRolePlaying, arun_society
load_dotenv()
@ -169,7 +169,7 @@ async def main():
# Connect to all MCP toolkits
tools = [*mcp_toolkit.get_tools()]
society = await construct_society(question, tools)
answer, chat_history, token_count = await run_society(society)
answer, chat_history, token_count = await arun_society(society)
print(f"\033[94mAnswer: {answer}\033[0m")
finally:

View File

@ -13,7 +13,12 @@
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
from .common import extract_pattern
from .enhanced_role_playing import OwlRolePlaying, OwlGAIARolePlaying, run_society
from .enhanced_role_playing import (
OwlRolePlaying,
OwlGAIARolePlaying,
run_society,
arun_society,
)
from .gaia import GAIABenchmark
from .document_toolkit import DocumentProcessingToolkit
@ -22,6 +27,7 @@ __all__ = [
"OwlRolePlaying",
"OwlGAIARolePlaying",
"run_society",
"arun_society",
"GAIABenchmark",
"DocumentProcessingToolkit",
]