Package dev.dokimos.core.conversation
Class ConversationTrajectory.Builder
java.lang.Object
dev.dokimos.core.conversation.ConversationTrajectory.Builder
- Enclosing class:
ConversationTrajectory
Builder for constructing conversation trajectories.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassistantMessage(String content) Adds an assistant message to the trajectory.build()Builds the conversation trajectory.Adds a message to the trajectory.Adds all messages from a list.Adds metadata with the given key and value.Adds all entries from the given metadata map.Sets the scenario description.systemMessage(String content) Adds a system message to the trajectory.userMessage(String content) Adds a user message to the trajectory.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
scenario
Sets the scenario description.- Parameters:
scenario- the scenario description- Returns:
- this builder
-
message
Adds a message to the trajectory.- Parameters:
message- the message to add- Returns:
- this builder
-
userMessage
Adds a user message to the trajectory.- Parameters:
content- the message content- Returns:
- this builder
-
assistantMessage
Adds an assistant message to the trajectory.- Parameters:
content- the message content- Returns:
- this builder
-
systemMessage
Adds a system message to the trajectory.- Parameters:
content- the message content- Returns:
- this builder
-
messages
Adds all messages from a list.- Parameters:
messages- the messages to add- Returns:
- this builder
-
metadata
Adds metadata with the given key and value.- Parameters:
key- the metadata keyvalue- the metadata value- Returns:
- this builder
-
metadata
Adds all entries from the given metadata map.- Parameters:
metadata- the metadata to add- Returns:
- this builder
-
build
Builds the conversation trajectory.- Returns:
- a new conversation trajectory
-