mirror of
https://github.com/camel-ai/owl.git
synced 2025-12-26 02:06:20 +08:00
update mcp example
This commit is contained in:
parent
ab4b9f3515
commit
dabac0454a
@ -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:
|
||||
|
||||
@ -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",
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user