Interface ChatGenerationMetadata
- All Superinterfaces:
ResultMetadata
Abstract Data Type (ADT) encapsulating information on the completion choices in the AI
response.
- Since:
- 0.7.0
- Author:
- John Blum
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatGenerationMetadataFactory method used to construct a newChatGenerationMetadatafrom the givenfinish reasonand content filter metadata.<T> TReturns the underlying AI provider metadata for filtering applied to generation content.Get thereasonthis choice completed for the generation.
-
Field Details
-
NULL
-
-
Method Details
-
from
Factory method used to construct a newChatGenerationMetadatafrom the givenfinish reasonand content filter metadata.- Parameters:
finishReason-Stringcontain the reason for the choice completion.contentFilterMetadata- underlying AI provider metadata for filtering applied to generation content.- Returns:
- a new
ChatGenerationMetadatafrom the givenfinish reasonand content filter metadata.
-
getContentFilterMetadata
@Nullable <T> T getContentFilterMetadata()Returns the underlying AI provider metadata for filtering applied to generation content.- Type Parameters:
T-Typeused to cast the filtered content metadata into the AI provider-specific type.- Returns:
- the underlying AI provider metadata for filtering applied to generation content.
-
getFinishReason
String getFinishReason()Get thereasonthis choice completed for the generation.- Returns:
- the
reasonthis choice completed for the generation.
-