Class ChatMessageTextContent.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.services.chatcompletion.message.ChatMessageTextContent.Builder
-
- All Implemented Interfaces:
SemanticKernelBuilder<ChatMessageTextContent>
- Enclosing class:
- ChatMessageTextContent
public static class ChatMessageTextContent.Builder extends Object implements SemanticKernelBuilder<ChatMessageTextContent>
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChatMessageTextContentbuild()Build the object.ChatMessageTextContent.BuilderwithAuthorRole(AuthorRole authorRole)Set the author role of the messageChatMessageTextContent.BuilderwithContent(String content)Set the content of the messageChatMessageTextContent.BuilderwithEncoding(Charset encoding)Set the encoding of the messageChatMessageTextContent.BuilderwithMetadata(FunctionResultMetadata metadata)Set the metadata associated with the contentChatMessageTextContent.BuilderwithModelId(String modelId)Set the model ID used to generate the content
-
-
-
Method Detail
-
withContent
public ChatMessageTextContent.Builder withContent(String content)
Set the content of the message- Parameters:
content- The content of the message- Returns:
- The builder
-
withModelId
public ChatMessageTextContent.Builder withModelId(String modelId)
Set the model ID used to generate the content- Parameters:
modelId- The model ID- Returns:
- The builder
-
withMetadata
public ChatMessageTextContent.Builder withMetadata(FunctionResultMetadata metadata)
Set the metadata associated with the content- Parameters:
metadata- The metadata- Returns:
- The builder
-
withAuthorRole
public ChatMessageTextContent.Builder withAuthorRole(AuthorRole authorRole)
Set the author role of the message- Parameters:
authorRole- The author role- Returns:
- The builder
-
withEncoding
public ChatMessageTextContent.Builder withEncoding(Charset encoding)
Set the encoding of the message- Parameters:
encoding- The encoding- Returns:
- The builder
-
build
public ChatMessageTextContent build()
Description copied from interface:SemanticKernelBuilderBuild the object.- Specified by:
buildin interfaceSemanticKernelBuilder<ChatMessageTextContent>- Returns:
- a constructed object.
-
-