ChatMessageTextContent.Builder Class
- java.
lang. Object - com.
microsoft. semantickernel. services. chatcompletion. message. ChatMessageTextContent. Builder
- com.
Implements
public static class ChatMessageTextContent.Builder
implements SemanticKernelBuilder<ChatMessageTextContent>
Builder for the ChatMessageTextContent class.
Constructor Summary
Constructor | Description | |
---|---|---|
Builder() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Chat |
build()
Build the object. |
Builder |
withAuthorRole(AuthorRole authorRole)
Set the author role of the message |
Builder |
withContent(String content)
Set the content of the message |
Builder |
withEncoding(Charset encoding)
Set the encoding of the message |
Builder |
withMetadata(FunctionResultMetadata metadata)
Set the metadata associated with the content |
Builder |
withModelId(String modelId)
Set the model ID used to generate the content |
Methods inherited from java.lang.Object
Constructor Details
Builder
public Builder()
Method Details
build
public ChatMessageTextContent build()
Build the object.
withAuthorRole
public ChatMessageTextContent.Builder withAuthorRole(AuthorRole authorRole)
Set the author role of the message
Parameters:
Returns:
withContent
public ChatMessageTextContent.Builder withContent(String content)
Set the content of the message
Parameters:
Returns:
withEncoding
public ChatMessageTextContent.Builder withEncoding(Charset encoding)
Set the encoding of the message
Parameters:
Returns:
withMetadata
public ChatMessageTextContent.Builder withMetadata(FunctionResultMetadata metadata)
Set the metadata associated with the content
Parameters:
Returns:
withModelId
public ChatMessageTextContent.Builder withModelId(String modelId)
Set the model ID used to generate the content
Parameters:
Returns: