mirror of
https://github.com/camel-ai/owl.git
synced 2026-03-22 05:57:17 +08:00
minor update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user