diff --git a/libs/vertexai/langchain_google_vertexai/chat_models.py b/libs/vertexai/langchain_google_vertexai/chat_models.py index 642a7382..b9eec92f 100644 --- a/libs/vertexai/langchain_google_vertexai/chat_models.py +++ b/libs/vertexai/langchain_google_vertexai/chat_models.py @@ -164,7 +164,7 @@ def _convert_to_parts(message: BaseMessage) -> List[Part]: raw_content = [raw_content] return [_convert_to_prompt(part) for part in raw_content] - vertex_messages = [] + vertex_messages: List[Content] = [] convert_system_message_to_human_content = None system_instruction = None for i, message in enumerate(history): @@ -733,7 +733,6 @@ async def _astream( project=self.project, convert_system_message_to_human=self.convert_system_message_to_human, ) - message = history_gemini.pop() self.client = _get_client_with_sys_instruction( client=self.client, system_instruction=system_instruction, diff --git a/libs/vertexai/pyproject.toml b/libs/vertexai/pyproject.toml index 68373e40..18dc8169 100644 --- a/libs/vertexai/pyproject.toml +++ b/libs/vertexai/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "langchain-google-vertexai" -version = "0.1.3" +version = "1.0.1" description = "An integration package connecting Google VertexAI and LangChain" authors = [] readme = "README.md" diff --git a/libs/vertexai/tests/integration_tests/test_chat_models.py b/libs/vertexai/tests/integration_tests/test_chat_models.py index 91627cc9..75a51dcc 100644 --- a/libs/vertexai/tests/integration_tests/test_chat_models.py +++ b/libs/vertexai/tests/integration_tests/test_chat_models.py @@ -96,7 +96,6 @@ def test_vertexai_stream(model_name: str) -> None: assert isinstance(chunk, AIMessageChunk) -@pytest.mark.xfail @pytest.mark.release async def test_vertexai_astream() -> None: model = ChatVertexAI(temperature=0, model_name="gemini-pro") @@ -144,7 +143,6 @@ def test_multimodal() -> None: @pytest.mark.release -@pytest.mark.xfail(reason="problem on vertex side") def test_multimodal_history() -> None: llm = ChatVertexAI(model_name="gemini-pro-vision") gcs_url = (