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

@@ -13,6 +13,7 @@
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
# run_ollama.py by tj-scriptshttps://github.com/tj-scripts
import sys
from dotenv import load_dotenv
from camel.models import ModelFactory
from camel.toolkits import (
@@ -64,7 +65,7 @@ def construct_society(question: str) -> RolePlaying:
url="http://localhost:11434/v1",
model_config_dict={"temperature": 0.2, "max_tokens": 1000000},
),
"web": ModelFactory.create(
"browsing": ModelFactory.create(
model_platform=ModelPlatformType.OLLAMA,
model_type="llava:latest",
url="http://localhost:11434/v1",
@@ -124,11 +125,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 = "Navigate to Amazon.com and identify one product that is attractive to coders. Please provide me with the product name and price. No need to verify your answer."
# Default research question
default_task = "Navigate to Amazon.com and identify one product that is attractive to coders. Please provide me with the product name and price. No need to verify your answer."
# 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