Record Class CohereChatBedrockApi.CohereChatResponse.Generation

java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.cohere.api.CohereChatBedrockApi.CohereChatResponse.Generation
Record Components:
id - An identifier for the generation. (Always returned).
eventType - The type of event that occurred. (Always returned).
likelihood - The likelihood of the output. The value is the average of the token likelihoods in token_likelihoods. Returned if you specify the return_likelihoods input parameter.
tokenLikelihoods - An array of per token likelihoods. Returned if you specify the return_likelihoods input parameter.
finishReason - states the reason why the model finished generating tokens.
isFinished - A boolean field used only when stream is true, signifying whether or not there are additional tokens that will be generated as part of the streaming response. (Not always returned).
text - The generated text.
index - In a streaming response, use to determine which generation a given token belongs to. When only one response is streamed, all tokens belong to the same generation and index is not returned. index therefore is only returned in a streaming request with a value for num_generations that is larger than one.
amazonBedrockInvocationMetrics - Encapsulates the metrics about the model invocation.
Enclosing class:
CohereChatBedrockApi.CohereChatResponse

public static record CohereChatBedrockApi.CohereChatResponse.Generation(String id, String eventType, Float likelihood, List<CohereChatBedrockApi.CohereChatResponse.Generation.TokenLikelihood> tokenLikelihoods, CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason finishReason, Boolean isFinished, String text, Integer index, AbstractBedrockApi.AmazonBedrockInvocationMetrics amazonBedrockInvocationMetrics) extends Record
Generated result along with the likelihoods for tokens requested.