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
fixed groq type error
Gregor Žuničaa1309131245
diff --git a/browser_use/llm/groq/serializer.py b/browser_use/llm/groq/serializer.pyindex c84957dba..8917b7ded 100644--- a/browser_use/llm/groq/serializer.py+++ b/browser_use/llm/groq/serializer.py@@ -72,19 +72,19 @@ class GroqMessageSerializer:@staticmethoddef _serialize_assistant_content(content: str | list[ContentPartTextParam | ContentPartRefusalParam] | None,- ) -> str | list[ChatCompletionContentPartTextParam] | None:+ ) -> str | None:"""Serialize content for assistant messages (text and refusal allowed)."""if content is None:return Noneif isinstance(content, str):return content- serialized_parts: list[ChatCompletionContentPartTextParam] = []+ serialized_parts: list[str] = []for part in content:if part.type == 'text':- serialized_parts.append(GroqMessageSerializer._serialize_content_part_text(part))+ serialized_parts.append(GroqMessageSerializer._serialize_content_part_text(part)['text'])- return serialized_parts+ return '\n'.join(serialized_parts)@staticmethoddef _serialize_tool_call(tool_call: ToolCall) -> ChatCompletionMessageToolCallParam: