minor update

This commit is contained in:
Wendong
2025-03-20 16:19:27 +08:00
parent 63c3057bf4
commit 42961908e2
16 changed files with 99 additions and 47 deletions

View File

@@ -12,6 +12,7 @@
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
from dotenv import load_dotenv
import sys
import os
from camel.models import ModelFactory
from camel.toolkits import (
@@ -58,7 +59,7 @@ def construct_society(question: str) -> RolePlaying:
model_type=ModelType.GPT_4O,
model_config_dict={"temperature": 0},
),
"web": ModelFactory.create(
"browsing": ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O,
model_config_dict={"temperature": 0},
@@ -108,11 +109,14 @@ def construct_society(question: str) -> RolePlaying:
def main():
r"""Main function to run the OWL system with an example question."""
# Example research question
question = f"""打开百度搜索总结一下camel-ai的camel框架的github star、fork数目等并把数字用plot包写成python文件保存到"+{os.path.join
default_task = f"""打开百度搜索总结一下camel-ai的camel框架的github star、fork数目等并把数字用plot包写成python文件保存到"+{os.path.join
(base_dir, 'final_output')}+"用本地终端执行python文件显示图出来给我"""
# Override default task if command line argument is provided
task = sys.argv[1] if len(sys.argv) > 1 else default_task
# Construct and run the society
society = construct_society(question)
society = construct_society(task)
answer, chat_history, token_count = run_society(society)
# Output the result