diff --git a/integrations/google_vertex/src/haystack_integrations/components/generators/google_vertex/chat/gemini.py b/integrations/google_vertex/src/haystack_integrations/components/generators/google_vertex/chat/gemini.py index 2309ca718..845e24f5f 100644 --- a/integrations/google_vertex/src/haystack_integrations/components/generators/google_vertex/chat/gemini.py +++ b/integrations/google_vertex/src/haystack_integrations/components/generators/google_vertex/chat/gemini.py @@ -280,12 +280,10 @@ def _get_response(self, response_body: GenerationResponse) -> List[ChatMessage]: # Remove content from metadata metadata.pop("content", None) if part._raw_part.text != "": - replies.append(ChatMessage.from_assistant(content=part._raw_part.text, meta=metadata)) + replies.append(ChatMessage.from_assistant(part._raw_part.text, meta=metadata)) elif part.function_call: metadata["function_call"] = part.function_call - new_message = ChatMessage.from_assistant( - content=json.dumps(dict(part.function_call.args)), meta=metadata - ) + new_message = ChatMessage.from_assistant(json.dumps(dict(part.function_call.args)), meta=metadata) new_message.name = part.function_call.name replies.append(new_message) return replies