From 8fe582a412faedd596168773e97acc410037a40e Mon Sep 17 00:00:00 2001 From: Leonid Kuligin Date: Wed, 13 Dec 2023 08:22:16 +0100 Subject: [PATCH] bumped required sdk version --- libs/community/langchain_community/chat_models/vertexai.py | 2 +- libs/community/langchain_community/utilities/vertexai.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/community/langchain_community/chat_models/vertexai.py b/libs/community/langchain_community/chat_models/vertexai.py index c8c02ec1df8..bb48aecb477 100644 --- a/libs/community/langchain_community/chat_models/vertexai.py +++ b/libs/community/langchain_community/chat_models/vertexai.py @@ -100,7 +100,7 @@ def _parse_chat_history_gemini( f"Message's content is expected to be a dict, got {type(part)}!" ) if part["type"] == "text": - return Part.from_text("text") + return Part.from_text(part["text"]) elif part["type"] == "image_url": path = part["image_url"]["url"] if path.startswith("gs://"): diff --git a/libs/community/langchain_community/utilities/vertexai.py b/libs/community/langchain_community/utilities/vertexai.py index 01614ceccd2..88b9bd3394c 100644 --- a/libs/community/langchain_community/utilities/vertexai.py +++ b/libs/community/langchain_community/utilities/vertexai.py @@ -38,7 +38,7 @@ def create_retry_decorator( return decorator -def raise_vertex_import_error(minimum_expected_version: str = "1.36.0") -> None: +def raise_vertex_import_error(minimum_expected_version: str = "1.38.0") -> None: """Raise ImportError related to Vertex SDK being not available. Args: