Class DefaultChatGenerationMetadataBuilder
java.lang.Object
org.springframework.ai.chat.metadata.DefaultChatGenerationMetadataBuilder
- All Implemented Interfaces:
ChatGenerationMetadata.Builder
public class DefaultChatGenerationMetadataBuilder
extends Object
implements ChatGenerationMetadata.Builder
- Since:
- 1.0.0
- Author:
- Christian Tzolov
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the Generation metadata.contentFilter
(String contentFilter) Add content filter to the Generation result.contentFilters
(Set<String> contentFilters) Add content filters to the Generation result.finishReason
(String finishReason) Set the reason this choice completed for the generation.Add metadata to the Generation result.Add metadata to the Generation result.
-
Method Details
-
finishReason
Description copied from interface:ChatGenerationMetadata.Builder
Set the reason this choice completed for the generation.- Specified by:
finishReason
in interfaceChatGenerationMetadata.Builder
-
metadata
Description copied from interface:ChatGenerationMetadata.Builder
Add metadata to the Generation result.- Specified by:
metadata
in interfaceChatGenerationMetadata.Builder
-
metadata
Description copied from interface:ChatGenerationMetadata.Builder
Add metadata to the Generation result.- Specified by:
metadata
in interfaceChatGenerationMetadata.Builder
-
contentFilter
Description copied from interface:ChatGenerationMetadata.Builder
Add content filter to the Generation result.- Specified by:
contentFilter
in interfaceChatGenerationMetadata.Builder
-
contentFilters
Description copied from interface:ChatGenerationMetadata.Builder
Add content filters to the Generation result.- Specified by:
contentFilters
in interfaceChatGenerationMetadata.Builder
-
build
Description copied from interface:ChatGenerationMetadata.Builder
Build the Generation metadata.- Specified by:
build
in interfaceChatGenerationMetadata.Builder
-