Class KernelContent<T>
- java.lang.Object
-
- com.microsoft.semantickernel.services.KernelContent<T>
-
- Type Parameters:
T- The type of the content.
- Direct Known Subclasses:
ChatMessageContent,StreamingKernelContent,TextContent
public abstract class KernelContent<T> extends Object
Base class which represents the content returned by an AI service.
-
-
Constructor Summary
Constructors Constructor Description KernelContent(T innerContent, String modelId, FunctionResultMetadata metadata)Initializes a new instance of theKernelContentclass.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetContent()Gets the content returned by the AI service.TgetInnerContent()Gets the inner content representation.FunctionResultMetadatagetMetadata()Gets the metadata associated with the content.StringgetModelId()Gets the model identifier used to generate the content.
-
-
-
Constructor Detail
-
KernelContent
public KernelContent(@Nullable T innerContent, @Nullable String modelId, @Nullable FunctionResultMetadata metadata)
Initializes a new instance of theKernelContentclass.- Parameters:
innerContent- The inner content representation.modelId- The model identifier used to generate the content.metadata- The metadata associated with the content.
-
-
Method Detail
-
getInnerContent
@Nullable public T getInnerContent()
Gets the inner content representation.- Returns:
- The inner content representation.
-
getModelId
@Nullable public String getModelId()
Gets the model identifier used to generate the content.- Returns:
- The model identifier used to generate the content.
-
getMetadata
@Nullable public FunctionResultMetadata getMetadata()
Gets the metadata associated with the content.- Returns:
- The metadata associated with the content.
-
-