Skip to content

Commit de80695

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: GenAI - Added the Candidate.avg_logprobs property
PiperOrigin-RevId: 665405497
1 parent 34ef5a3 commit de80695

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vertexai/generative_models/_generative_models.py

+4
Original file line numberDiff line numberDiff line change
@@ -1941,6 +1941,10 @@ def content(self) -> "Content":
19411941
raw_content=self._raw_candidate.content,
19421942
)
19431943

1944+
@property
1945+
def avg_logprobs(self) -> float:
1946+
return self._raw_candidate.avg_logprobs
1947+
19441948
@property
19451949
def finish_reason(self) -> gapic_content_types.Candidate.FinishReason:
19461950
return self._raw_candidate.finish_reason

0 commit comments

Comments
 (0)