mirror of
https://github.com/camel-ai/owl.git
synced 2026-03-22 05:57:17 +08:00
enhance: update camel version to latest, add browse tools, and update qwen models (#597)
This commit is contained in:
@@ -48,25 +48,37 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
|
||||
web_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_1,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
document_processing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_1,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
reasoning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_1,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
image_analysis_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_1,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
browsing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
planning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
@@ -76,6 +88,11 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
|
||||
file_toolkit = FileToolkit()
|
||||
excel_toolkit = ExcelToolkit()
|
||||
browser_toolkit = BrowserToolkit(
|
||||
headless=False, # Set to True for headless mode (e.g., on remote servers)
|
||||
web_agent_model=browsing_model,
|
||||
planning_agent_model=planning_model,
|
||||
)
|
||||
|
||||
web_agent = ChatAgent(
|
||||
"""
|
||||
@@ -103,6 +120,7 @@ Here are some tips that help you perform web search:
|
||||
FunctionTool(search_toolkit.search_duckduckgo),
|
||||
FunctionTool(search_toolkit.search_wiki),
|
||||
FunctionTool(document_processing_toolkit.extract_document_content),
|
||||
*browser_toolkit.get_tools(),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -158,7 +176,7 @@ def construct_workforce() -> Workforce:
|
||||
coordinator_agent_kwargs = {
|
||||
"model": ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_1,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
}
|
||||
@@ -166,7 +184,7 @@ def construct_workforce() -> Workforce:
|
||||
task_agent_kwargs = {
|
||||
"model": ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI,
|
||||
model_type=ModelType.GPT_5_1,
|
||||
model_type=ModelType.GPT_5_2,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
}
|
||||
@@ -201,7 +219,7 @@ def construct_workforce() -> Workforce:
|
||||
def main():
|
||||
r"""Main function to run the OWL system with an example question."""
|
||||
# Default research question
|
||||
default_task_prompt = "Summarize the github stars, fork counts, etc. of camel-ai's owl framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file. Note: You have been provided with the necessary tools to complete this task."
|
||||
default_task_prompt = "Use Browser Toolkit to summarize the github stars, fork counts, etc. of camel-ai's owl framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file. Note: You have been provided with the necessary tools to complete this task."
|
||||
|
||||
# Override default task if command line argument is provided
|
||||
task_prompt = sys.argv[1] if len(sys.argv) > 1 else default_task_prompt
|
||||
|
||||
@@ -33,6 +33,7 @@ from camel.toolkits import (
|
||||
ImageAnalysisToolkit,
|
||||
SearchToolkit,
|
||||
VideoAnalysisToolkit,
|
||||
BrowserToolkit,
|
||||
FileToolkit,
|
||||
)
|
||||
from camel.types import ModelPlatformType, ModelType
|
||||
@@ -57,25 +58,37 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
|
||||
web_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_3_7_SONNET,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
document_processing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_3_7_SONNET,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
reasoning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_3_7_SONNET,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
image_analysis_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_3_7_SONNET,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
browsing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
planning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
@@ -85,6 +98,11 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
|
||||
file_toolkit = FileToolkit()
|
||||
excel_toolkit = ExcelToolkit()
|
||||
browser_toolkit = BrowserToolkit(
|
||||
headless=False, # Set to True for headless mode (e.g., on remote servers)
|
||||
web_agent_model=browsing_model,
|
||||
planning_agent_model=planning_model,
|
||||
)
|
||||
|
||||
web_agent = ChatAgent(
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, simulate browser actions, and provide relevant information to solve the given task.
|
||||
@@ -110,6 +128,7 @@ Here are some tips that help you perform web search:
|
||||
FunctionTool(search_toolkit.search_duckduckgo),
|
||||
FunctionTool(search_toolkit.search_wiki),
|
||||
FunctionTool(document_processing_toolkit.extract_document_content),
|
||||
*browser_toolkit.get_tools(),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -166,7 +185,7 @@ def construct_workforce() -> Workforce:
|
||||
coordinator_agent_kwargs = {
|
||||
"model": ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_3_7_SONNET,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
}
|
||||
@@ -174,7 +193,7 @@ def construct_workforce() -> Workforce:
|
||||
task_agent_kwargs = {
|
||||
"model": ModelFactory.create(
|
||||
model_platform=ModelPlatformType.ANTHROPIC,
|
||||
model_type=ModelType.CLAUDE_3_7_SONNET,
|
||||
model_type=ModelType.CLAUDE_OPUS_4_6,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ from camel.toolkits import (
|
||||
CodeExecutionToolkit,
|
||||
ExcelToolkit,
|
||||
SearchToolkit,
|
||||
BrowserToolkit,
|
||||
FileToolkit,
|
||||
)
|
||||
from camel.types import ModelPlatformType, ModelType
|
||||
@@ -77,24 +78,46 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
browsing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.GROQ,
|
||||
model_type=ModelType.GROQ_LLAMA_3_3_70B,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
planning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.GROQ,
|
||||
model_type=ModelType.GROQ_LLAMA_3_3_70B,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
search_toolkit = SearchToolkit()
|
||||
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
|
||||
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
|
||||
file_toolkit = FileToolkit()
|
||||
excel_toolkit = ExcelToolkit()
|
||||
browser_toolkit = BrowserToolkit(
|
||||
headless=False, # Set to True for headless mode (e.g., on remote servers)
|
||||
web_agent_model=browsing_model,
|
||||
planning_agent_model=planning_model,
|
||||
)
|
||||
|
||||
web_agent = ChatAgent(
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, and provide relevant information to solve the given task.
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, simulate browser actions, and provide relevant information to solve the given task.
|
||||
Keep in mind that:
|
||||
- Do not be overly confident in your own knowledge. Searching can provide a broader perspective and help validate existing knowledge.
|
||||
- If one way fails to provide an answer, try other ways or methods. The answer does exist.
|
||||
- When looking for specific numerical values (e.g., dollar amounts), prioritize reliable sources.
|
||||
- If the search snippet is unhelpful but the URL comes from an authoritative source, try visit the website for more details.
|
||||
- When looking for specific numerical values (e.g., dollar amounts), prioritize reliable sources and avoid relying only on search snippets.
|
||||
- When solving tasks that require web searches, check Wikipedia first before exploring other websites.
|
||||
- You can also simulate browser actions to get more information or verify the information you have found.
|
||||
- Browser simulation is also helpful for finding target URLs. Browser simulation operations do not necessarily need to find specific answers, but can also help find web page URLs that contain answers (usually difficult to find through simple web searches). You can find the answer to the question by performing subsequent operations on the URL, such as extracting the content of the webpage.
|
||||
- Do not solely rely on document tools or browser simulation to find the answer, you should combine document tools and browser simulation to comprehensively process web page information. Some content may need to do browser simulation to get, or some content is rendered by javascript.
|
||||
- In your response, you should mention the urls you have visited and processed.
|
||||
|
||||
Here are some tips that help you perform web search:
|
||||
- Never add too many keywords in your search query!
|
||||
- If the question is complex, search results typically do not provide precise answers. The search query should be concise and focuses on finding official sources rather than direct answers.
|
||||
- Never add too many keywords in your search query! Some detailed results need to perform browser interaction to get, not using search toolkit.
|
||||
- If the question is complex, search results typically do not provide precise answers. It is not likely to find the answer directly using search toolkit only, the search query should be concise and focuses on finding official sources rather than direct answers.
|
||||
For example, as for the question "What is the maximum length in meters of #9 in the first National Geographic short on YouTube that was ever released according to the Monterey Bay Aquarium website?", your first search term must be coarse-grained like "National Geographic YouTube" to find the youtube website first, and then try other fine-grained search terms step-by-step to find more urls.
|
||||
- The results you return do not have to directly answer the original question, you only need to collect relevant information.
|
||||
""",
|
||||
model=web_model,
|
||||
@@ -102,6 +125,7 @@ Here are some tips that help you perform web search:
|
||||
FunctionTool(search_toolkit.search_duckduckgo),
|
||||
FunctionTool(search_toolkit.search_wiki),
|
||||
FunctionTool(document_processing_toolkit.extract_document_content),
|
||||
*browser_toolkit.get_tools(),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -18,10 +18,6 @@ Workforce example using Qwen models from Alibaba Cloud.
|
||||
To run this file, you need to configure the Qwen API key.
|
||||
You can obtain your API key from Bailian platform: bailian.console.aliyun.com
|
||||
Set it as QWEN_API_KEY="your-api-key" in your .env file or add it to your environment variables.
|
||||
|
||||
Qwen models support:
|
||||
- QWEN_MAX: For text-based tasks
|
||||
- QWEN_VL_MAX: For vision-language tasks (multimodal)
|
||||
"""
|
||||
|
||||
import sys
|
||||
@@ -36,6 +32,7 @@ from camel.toolkits import (
|
||||
ImageAnalysisToolkit,
|
||||
SearchToolkit,
|
||||
VideoAnalysisToolkit,
|
||||
BrowserToolkit,
|
||||
FileToolkit,
|
||||
)
|
||||
from camel.types import ModelPlatformType, ModelType
|
||||
@@ -58,31 +55,39 @@ set_log_level(level="DEBUG")
|
||||
def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
"""Construct a list of agents with their configurations."""
|
||||
|
||||
# Use QWEN_MAX for text-based tasks
|
||||
web_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type=ModelType.QWEN_MAX,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
# Use QWEN_VL_MAX for document processing (supports multimodal)
|
||||
document_processing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type=ModelType.QWEN_VL_MAX,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
# Use QWEN_MAX for reasoning tasks
|
||||
reasoning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type=ModelType.QWEN_MAX,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
# Use QWEN_VL_MAX for image analysis
|
||||
image_analysis_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type=ModelType.QWEN_VL_MAX,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
browsing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
planning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
@@ -92,19 +97,29 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
|
||||
file_toolkit = FileToolkit()
|
||||
excel_toolkit = ExcelToolkit()
|
||||
browser_toolkit = BrowserToolkit(
|
||||
headless=False, # Set to True for headless mode (e.g., on remote servers)
|
||||
web_agent_model=browsing_model,
|
||||
planning_agent_model=planning_model,
|
||||
)
|
||||
|
||||
web_agent = ChatAgent(
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, and provide relevant information to solve the given task.
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, simulate browser actions, and provide relevant information to solve the given task.
|
||||
Keep in mind that:
|
||||
- Do not be overly confident in your own knowledge. Searching can provide a broader perspective and help validate existing knowledge.
|
||||
- If one way fails to provide an answer, try other ways or methods. The answer does exist.
|
||||
- When looking for specific numerical values (e.g., dollar amounts), prioritize reliable sources.
|
||||
- If the search snippet is unhelpful but the URL comes from an authoritative source, try visit the website for more details.
|
||||
- When looking for specific numerical values (e.g., dollar amounts), prioritize reliable sources and avoid relying only on search snippets.
|
||||
- When solving tasks that require web searches, check Wikipedia first before exploring other websites.
|
||||
- You can also simulate browser actions to get more information or verify the information you have found.
|
||||
- Browser simulation is also helpful for finding target URLs. Browser simulation operations do not necessarily need to find specific answers, but can also help find web page URLs that contain answers (usually difficult to find through simple web searches). You can find the answer to the question by performing subsequent operations on the URL, such as extracting the content of the webpage.
|
||||
- Do not solely rely on document tools or browser simulation to find the answer, you should combine document tools and browser simulation to comprehensively process web page information. Some content may need to do browser simulation to get, or some content is rendered by javascript.
|
||||
- In your response, you should mention the urls you have visited and processed.
|
||||
|
||||
Here are some tips that help you perform web search:
|
||||
- Never add too many keywords in your search query!
|
||||
- If the question is complex, search results typically do not provide precise answers. The search query should be concise and focuses on finding official sources rather than direct answers.
|
||||
- Never add too many keywords in your search query! Some detailed results need to perform browser interaction to get, not using search toolkit.
|
||||
- If the question is complex, search results typically do not provide precise answers. It is not likely to find the answer directly using search toolkit only, the search query should be concise and focuses on finding official sources rather than direct answers.
|
||||
For example, as for the question "What is the maximum length in meters of #9 in the first National Geographic short on YouTube that was ever released according to the Monterey Bay Aquarium website?", your first search term must be coarse-grained like "National Geographic YouTube" to find the youtube website first, and then try other fine-grained search terms step-by-step to find more urls.
|
||||
- The results you return do not have to directly answer the original question, you only need to collect relevant information.
|
||||
""",
|
||||
model=web_model,
|
||||
@@ -113,6 +128,7 @@ Here are some tips that help you perform web search:
|
||||
FunctionTool(search_toolkit.search_wiki),
|
||||
FunctionTool(search_toolkit.search_baidu),
|
||||
FunctionTool(document_processing_toolkit.extract_document_content),
|
||||
*browser_toolkit.get_tools(),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -169,7 +185,7 @@ def construct_workforce() -> Workforce:
|
||||
coordinator_agent_kwargs = {
|
||||
"model": ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type=ModelType.QWEN_MAX,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
}
|
||||
@@ -177,7 +193,7 @@ def construct_workforce() -> Workforce:
|
||||
task_agent_kwargs = {
|
||||
"model": ModelFactory.create(
|
||||
model_platform=ModelPlatformType.QWEN,
|
||||
model_type=ModelType.QWEN_MAX,
|
||||
model_type="qwen3.5-plus",
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ from camel.toolkits import (
|
||||
CodeExecutionToolkit,
|
||||
ExcelToolkit,
|
||||
SearchToolkit,
|
||||
BrowserToolkit,
|
||||
FileToolkit,
|
||||
)
|
||||
from camel.types import ModelPlatformType
|
||||
@@ -75,7 +76,7 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
# Get configuration from environment variables
|
||||
api_url = os.getenv("VLLM_API_URL", "http://localhost:8000/v1")
|
||||
api_key = os.getenv("VLLM_API_KEY", None)
|
||||
model_name = os.getenv("VLLM_MODEL_NAME", "meta-llama/Llama-2-7b-chat-hf")
|
||||
model_name = os.getenv("VLLM_MODEL_NAME", "meta-llama/Llama-3.1-8B-Instruct")
|
||||
|
||||
web_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI_COMPATIBLE_MODEL,
|
||||
@@ -101,24 +102,50 @@ def construct_agent_list() -> List[Dict[str, Any]]:
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
browsing_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI_COMPATIBLE_MODEL,
|
||||
model_type=model_name,
|
||||
url=api_url,
|
||||
api_key=api_key,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
planning_model = ModelFactory.create(
|
||||
model_platform=ModelPlatformType.OPENAI_COMPATIBLE_MODEL,
|
||||
model_type=model_name,
|
||||
url=api_url,
|
||||
api_key=api_key,
|
||||
model_config_dict={"temperature": 0},
|
||||
)
|
||||
|
||||
search_toolkit = SearchToolkit()
|
||||
document_processing_toolkit = DocumentProcessingToolkit(model=document_processing_model)
|
||||
code_runner_toolkit = CodeExecutionToolkit(sandbox="subprocess", verbose=True)
|
||||
file_toolkit = FileToolkit()
|
||||
excel_toolkit = ExcelToolkit()
|
||||
browser_toolkit = BrowserToolkit(
|
||||
headless=False, # Set to True for headless mode (e.g., on remote servers)
|
||||
web_agent_model=browsing_model,
|
||||
planning_agent_model=planning_model,
|
||||
)
|
||||
|
||||
web_agent = ChatAgent(
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, and provide relevant information to solve the given task.
|
||||
"""You are a helpful assistant that can search the web, extract webpage content, simulate browser actions, and provide relevant information to solve the given task.
|
||||
Keep in mind that:
|
||||
- Do not be overly confident in your own knowledge. Searching can provide a broader perspective and help validate existing knowledge.
|
||||
- If one way fails to provide an answer, try other ways or methods. The answer does exist.
|
||||
- When looking for specific numerical values (e.g., dollar amounts), prioritize reliable sources.
|
||||
- If the search snippet is unhelpful but the URL comes from an authoritative source, try visit the website for more details.
|
||||
- When looking for specific numerical values (e.g., dollar amounts), prioritize reliable sources and avoid relying only on search snippets.
|
||||
- When solving tasks that require web searches, check Wikipedia first before exploring other websites.
|
||||
- You can also simulate browser actions to get more information or verify the information you have found.
|
||||
- Browser simulation is also helpful for finding target URLs. Browser simulation operations do not necessarily need to find specific answers, but can also help find web page URLs that contain answers (usually difficult to find through simple web searches). You can find the answer to the question by performing subsequent operations on the URL, such as extracting the content of the webpage.
|
||||
- Do not solely rely on document tools or browser simulation to find the answer, you should combine document tools and browser simulation to comprehensively process web page information. Some content may need to do browser simulation to get, or some content is rendered by javascript.
|
||||
- In your response, you should mention the urls you have visited and processed.
|
||||
|
||||
Here are some tips that help you perform web search:
|
||||
- Never add too many keywords in your search query!
|
||||
- If the question is complex, search results typically do not provide precise answers. The search query should be concise and focuses on finding official sources rather than direct answers.
|
||||
- Never add too many keywords in your search query! Some detailed results need to perform browser interaction to get, not using search toolkit.
|
||||
- If the question is complex, search results typically do not provide precise answers. It is not likely to find the answer directly using search toolkit only, the search query should be concise and focuses on finding official sources rather than direct answers.
|
||||
For example, as for the question "What is the maximum length in meters of #9 in the first National Geographic short on YouTube that was ever released according to the Monterey Bay Aquarium website?", your first search term must be coarse-grained like "National Geographic YouTube" to find the youtube website first, and then try other fine-grained search terms step-by-step to find more urls.
|
||||
- The results you return do not have to directly answer the original question, you only need to collect relevant information.
|
||||
""",
|
||||
model=web_model,
|
||||
@@ -126,6 +153,7 @@ Here are some tips that help you perform web search:
|
||||
FunctionTool(search_toolkit.search_duckduckgo),
|
||||
FunctionTool(search_toolkit.search_wiki),
|
||||
FunctionTool(document_processing_toolkit.extract_document_content),
|
||||
*browser_toolkit.get_tools(),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user