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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChatGenerationMetadata
Factory method used to construct a newChatGenerationMetadata
from the givenfinish reason
and content filter metadata.<T> T
Returns the underlying AI provider metadata for filtering applied to generation content.Get thereason
this choice completed for the generation.
-
Field Details
-
NULL
-
-
Method Details
-
from
Factory method used to construct a newChatGenerationMetadata
from the givenfinish reason
and content filter metadata.- Parameters:
finishReason
-String
contain the reason for the choice completion.contentFilterMetadata
- underlying AI provider metadata for filtering applied to generation content.- Returns:
- a new
ChatGenerationMetadata
from the givenfinish reason
and content filter metadata.
-
getContentFilterMetadata
@Nullable <T> T getContentFilterMetadata()Returns the underlying AI provider metadata for filtering applied to generation content.- Type Parameters:
T
-Type
used 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 thereason
this choice completed for the generation.- Returns:
- the
reason
this choice completed for the generation.
-