Candidate

class Candidate 

A piece of a response from the model. Contains the FinishReason in addition to the response text String of the response.

Summary

Nested types

@ IntDef (value = [0, 1, -100])
annotation Candidate.FinishReason

The reason why this Candidate is returned.

Public properties

Int ?

the reason why this Candidate is finished generating.

String

the text string of the Candidate .

Public properties

finishReason

val  finishReason 
 Int 
?

the reason why this Candidate is finished generating. This will be null for intermediate responses during streaming, and non-null for the final response in streaming or non-streaming mode.

text

val  text 
 String 

the text string of the Candidate .

Design a Mobile Site
View Site in Mobile | Classic
Share by: