From f297c9018f39cb89ec888a3d85c4f880d7ca136e Mon Sep 17 00:00:00 2001 From: Leonid Kuligin Date: Tue, 20 Feb 2024 21:29:42 +0100 Subject: [PATCH] fixes after review --- libs/vertexai/langchain_google_vertexai/chat_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vertexai/langchain_google_vertexai/chat_models.py b/libs/vertexai/langchain_google_vertexai/chat_models.py index a33d07647..87ab12cac 100644 --- a/libs/vertexai/langchain_google_vertexai/chat_models.py +++ b/libs/vertexai/langchain_google_vertexai/chat_models.py @@ -399,12 +399,12 @@ def _generate( ChatGeneration( message=_parse_response_candidate(c), generation_info=get_generation_info( - c, + candidate, self._is_gemini_model, usage_metadata=response.to_dict().get("usage_metadata"), ), ) - for c in response.candidates + for candidate in response.candidates ] else: question = _get_question(messages)