Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
removed unused `_serialize_tool_content` for groq and openai serializer
Gregor Žuničf2fc8a357ead
diff --git a/browser_use/llm/groq/serializer.py b/browser_use/llm/groq/serializer.pyindex f610edb4e..c84957dba 100644--- a/browser_use/llm/groq/serializer.py+++ b/browser_use/llm/groq/serializer.py@@ -69,20 +69,6 @@ class GroqMessageSerializer:return '\n'.join(serialized_parts)- @staticmethod- def _serialize_tool_content(- content: str | list[ContentPartTextParam],- ) -> str | list[ChatCompletionContentPartTextParam]:- """Serialize content for tool messages (text only)."""- if isinstance(content, str):- return content-- serialized_parts: list[ChatCompletionContentPartTextParam] = []- for part in content:- if part.type == 'text':- serialized_parts.append(GroqMessageSerializer._serialize_content_part_text(part))- return serialized_parts-@staticmethoddef _serialize_assistant_content(content: str | list[ContentPartTextParam | ContentPartRefusalParam] | None,diff --git a/browser_use/llm/openai/serializer.py b/browser_use/llm/openai/serializer.pyindex 0d34fcfd7..66a339071 100644--- a/browser_use/llm/openai/serializer.py+++ b/browser_use/llm/openai/serializer.py@@ -73,20 +73,6 @@ class OpenAIMessageSerializer:serialized_parts.append(OpenAIMessageSerializer._serialize_content_part_text(part))return serialized_parts- @staticmethod- def _serialize_tool_content(- content: str | list[ContentPartTextParam],- ) -> str | list[ChatCompletionContentPartTextParam]:- """Serialize content for tool messages (text only)."""- if isinstance(content, str):- return content-- serialized_parts: list[ChatCompletionContentPartTextParam] = []- for part in content:- if part.type == 'text':- serialized_parts.append(OpenAIMessageSerializer._serialize_content_part_text(part))- return serialized_parts-@staticmethoddef _serialize_assistant_content(content: str | list[ContentPartTextParam | ContentPartRefusalParam] | None,