Class ChatCompletion.Choice
- 
                    
                    
- All Implemented Interfaces:
 
public final class ChatCompletion.Choice 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCompletion.Choice.BuilderA builder for Choice.
public final classChatCompletion.Choice.FinishReasonThe reason the model stopped generating tokens. This will be
stopif the model hit a natural stop point or a provided stop sequence,lengthif the maximum number of tokens specified in the request was reached,content_filterif content was omitted due to a flag from our content filters,tool_callsif the model called a tool, orfunction_call(deprecated) if the model called a function.public final classChatCompletion.Choice.LogprobsLog probability information for the choice.
 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final ChatCompletion.Choice.FinishReasonfinishReason()The reason the model stopped generating tokens. final Longindex()The index of the choice in the list of choices. final Optional<ChatCompletion.Choice.Logprobs>logprobs()Log probability information for the choice. final ChatCompletionMessagemessage()A chat completion message generated by the model. final JsonField<ChatCompletion.Choice.FinishReason>_finishReason()Returns the raw JSON value of finishReason. final JsonField<Long>_index()Returns the raw JSON value of index. final JsonField<ChatCompletion.Choice.Logprobs>_logprobs()Returns the raw JSON value of logprobs. final JsonField<ChatCompletionMessage>_message()Returns the raw JSON value of message. final Map<String, JsonValue>_additionalProperties()final ChatCompletion.Choice.BuildertoBuilder()final ChatCompletion.Choicevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCompletion.Choice.Builderbuilder()Returns a mutable builder for constructing an instance of Choice. - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
finishReason
final ChatCompletion.Choice.FinishReason finishReason()
The reason the model stopped generating tokens. This will be
stopif the model hit a natural stop point or a provided stop sequence,lengthif the maximum number of tokens specified in the request was reached,content_filterif content was omitted due to a flag from our content filters,tool_callsif the model called a tool, orfunction_call(deprecated) if the model called a function. 
- 
                                        
logprobs
final Optional<ChatCompletion.Choice.Logprobs> logprobs()
Log probability information for the choice.
 
- 
                                        
message
final ChatCompletionMessage message()
A chat completion message generated by the model.
 
- 
                                        
_finishReason
final JsonField<ChatCompletion.Choice.FinishReason> _finishReason()
Returns the raw JSON value of finishReason.
Unlike finishReason, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_index
final JsonField<Long> _index()
Returns the raw JSON value of index.
Unlike index, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_logprobs
final JsonField<ChatCompletion.Choice.Logprobs> _logprobs()
Returns the raw JSON value of logprobs.
Unlike logprobs, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_message
final JsonField<ChatCompletionMessage> _message()
Returns the raw JSON value of message.
Unlike message, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
 
- 
                                        
toBuilder
final ChatCompletion.Choice.Builder toBuilder()
 
- 
                                        
validate
final ChatCompletion.Choice validate()
 
- 
                                        
builder
final static ChatCompletion.Choice.Builder builder()
Returns a mutable builder for constructing an instance of Choice.
The following fields are required:
.finishReason() .index() .logprobs() .message() 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -