refactor: cleanup old use_websearch param
This commit is contained in:
@@ -1099,19 +1099,16 @@ class BaseTool(ABC):
|
||||
)
|
||||
return result, actually_processed_files
|
||||
|
||||
def get_websearch_instruction(self, use_websearch: bool, tool_specific: Optional[str] = None) -> str:
|
||||
def get_websearch_instruction(self, tool_specific: Optional[str] = None) -> str:
|
||||
"""
|
||||
Generate standardized web search instruction based on the use_websearch parameter.
|
||||
Generate standardized web search instruction.
|
||||
|
||||
Args:
|
||||
use_websearch: Whether web search is enabled
|
||||
tool_specific: Optional tool-specific search guidance
|
||||
|
||||
Returns:
|
||||
str: Web search instruction to append to prompt, or empty string
|
||||
str: Web search instruction to append to prompt
|
||||
"""
|
||||
if not use_websearch:
|
||||
return ""
|
||||
|
||||
base_instruction = """
|
||||
|
||||
|
||||
@@ -796,7 +796,7 @@ class SimpleTool(BaseTool):
|
||||
self._validate_token_limit(content_to_validate, "Content")
|
||||
|
||||
# Add standardized web search guidance
|
||||
websearch_instruction = self.get_websearch_instruction(True, self.get_websearch_guidance())
|
||||
websearch_instruction = self.get_websearch_instruction(self.get_websearch_guidance())
|
||||
|
||||
# Combine system prompt with user content
|
||||
full_prompt = f"""{system_prompt}{websearch_instruction}
|
||||
|
||||
Reference in New Issue
Block a user