Clean up global in llm.py (we figured it's not needed) (#6675)

This commit is contained in:
Engel Nyst 2025-02-11 00:00:46 +01:00 committed by GitHub
parent 4615548477
commit 1a715d2ec4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 20 deletions

View File

@ -303,7 +303,6 @@ class CodeActAgent(Agent):
and len(obs.set_of_marks) > 0
and self.config.enable_som_visual_browsing
and self.llm.vision_is_active()
and self.llm.is_visual_browser_tool_supported()
):
text += 'Image: Current webpage screenshot (Note that only visible portion of webpage is present in the screenshot. You may need to scroll to view the remaining portion of the web-page.)\n'
message = Message(

View File

@ -75,16 +75,6 @@ FUNCTION_CALLING_SUPPORTED_MODELS = [
'o3-mini',
]
# visual browsing tool supported models
# This flag is needed since gpt-4o and gpt-4o-mini do not allow passing image_urls with role='tool'
VISUAL_BROWSING_TOOL_SUPPORTED_MODELS = [
'claude-3-5-sonnet',
'claude-3-5-sonnet-20240620',
'claude-3-5-sonnet-20241022',
'o1-2024-12-17',
]
REASONING_EFFORT_SUPPORTED_MODELS = [
'o1-2024-12-17',
'o1',
@ -495,15 +485,6 @@ class LLM(RetryMixin, DebugMixin):
"""
return self._function_calling_active
def is_visual_browser_tool_supported(self) -> bool:
return (
self.config.model in VISUAL_BROWSING_TOOL_SUPPORTED_MODELS
or self.config.model.split('/')[-1] in VISUAL_BROWSING_TOOL_SUPPORTED_MODELS
or any(
m in self.config.model for m in VISUAL_BROWSING_TOOL_SUPPORTED_MODELS
)
)
def _post_completion(self, response: ModelResponse) -> float:
"""Post-process the completion response.