Skip to content

Commit

Permalink
Merge branch 'main' into xw/bash-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww authored Feb 11, 2025
2 parents cc5f738 + 1a715d2 commit 679d27a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
1 change: 0 additions & 1 deletion openhands/agenthub/codeact_agent/codeact_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ def get_observation_message(
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(
Expand Down
19 changes: 0 additions & 19 deletions openhands/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@
'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',
Expand Down Expand Up @@ -495,15 +485,6 @@ def is_function_calling_active(self) -> bool:
"""
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.
Expand Down
12 changes: 5 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ runloop-api-client = "0.22.0"
libtmux = ">=0.37,<0.40"
pygithub = "^2.5.0"
joblib = "*"
openhands-aci = "^0.2.0"
openhands-aci = "^0.2.1"
python-socketio = "^5.11.4"
redis = "^5.2.0"
sse-starlette = "^2.1.3"
Expand Down

0 comments on commit 679d27a

Please sign in to comment.