Skip to content

Commit

Permalink
vertexai: add finish message when available to the response object fr…
Browse files Browse the repository at this point in the history
…om gemini … (#595)
  • Loading branch information
nanodan authored Nov 14, 2024
1 parent 28eafae commit f199127
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/vertexai/langchain_google_vertexai/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ def get_generation_info(
"finish_reason": (
candidate.finish_reason.name if candidate.finish_reason else None
),
"finish_message": (
candidate.finish_message if candidate.finish_message else None
),
}
if hasattr(candidate, "avg_logprobs") and candidate.avg_logprobs is not None:
if (
Expand Down

0 comments on commit f199127

Please sign in to comment.