Skip to content

Commit

Permalink
feat: GenAI - Added the Candidate.avg_logprobs property
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 665405497
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Aug 20, 2024
1 parent 34ef5a3 commit de80695
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vertexai/generative_models/_generative_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,10 @@ def content(self) -> "Content":
raw_content=self._raw_candidate.content,
)

@property
def avg_logprobs(self) -> float:
return self._raw_candidate.avg_logprobs

@property
def finish_reason(self) -> gapic_content_types.Candidate.FinishReason:
return self._raw_candidate.finish_reason
Expand Down

0 comments on commit de80695

Please sign in to comment.