Share via


ChatMessageTextContent.Builder Class

  • java.lang.Object
    • com.microsoft.semantickernel.services.chatcompletion.message.ChatMessageTextContent.Builder

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
ChatMessageTextContent 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

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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:

authorRole - The author role

Returns:

The builder

withContent

public ChatMessageTextContent.Builder withContent(String content)

Set the content of the message

Parameters:

content - The content of the message

Returns:

The builder

withEncoding

public ChatMessageTextContent.Builder withEncoding(Charset encoding)

Set the encoding of the message

Parameters:

encoding - The encoding

Returns:

The builder

withMetadata

public ChatMessageTextContent.Builder withMetadata(FunctionResultMetadata metadata)

Set the metadata associated with the content

Parameters:

metadata - The metadata

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

Applies to