ConversationBuilder.WithConversation Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| WithConversation(ConversationAccount) |
Sets the conversation context for the builder using the specified conversation account. |
| WithConversation(String) |
Sets the conversation identifier for the builder and associates it with the conversation reference. |
WithConversation(ConversationAccount)
Sets the conversation context for the builder using the specified conversation account.
public Microsoft.Agents.Builder.App.Proactive.ConversationBuilder WithConversation(Microsoft.Agents.Core.Models.ConversationAccount conversation);
member this.WithConversation : Microsoft.Agents.Core.Models.ConversationAccount -> Microsoft.Agents.Builder.App.Proactive.ConversationBuilder
Public Function WithConversation (conversation As ConversationAccount) As ConversationBuilder
Parameters
- conversation
- ConversationAccount
The conversation account to associate with the builder. The conversation parameter must
not be null, and its Id property must not be null or whitespace.
Returns
The current ConversationBuilder instance with the conversation context set.
Exceptions
Thrown when the ConversationAccount.Id is null, empty, or consists solely of whitespace.
Applies to
WithConversation(String)
Sets the conversation identifier for the builder and associates it with the conversation reference.
public Microsoft.Agents.Builder.App.Proactive.ConversationBuilder WithConversation(string conversationId);
member this.WithConversation : string -> Microsoft.Agents.Builder.App.Proactive.ConversationBuilder
Public Function WithConversation (conversationId As String) As ConversationBuilder
Parameters
- conversationId
- String
The unique identifier of the conversation to associate with the builder. Cannot be null, empty, or consist only of white-space characters.
Returns
The current instance of ConversationBuilder with the conversation identifier set.
Exceptions
Thrown when the conversationId is null, empty, or consists solely of whitespace.