PromptBuilder
A builder class for creating prompts using a DSL approach.
PromptBuilder allows constructing prompts by adding different types of messages (system, user, assistant, tool) in a structured way.
Example usage:
val prompt = prompt("example-prompt") {
system("You are a helpful assistant.")
user("What is the capital of France?")
}
Content copied to clipboard
Functions
Link copied to clipboard
Adds tool-related messages to the prompt using a ToolMessageBuilder.
Link copied to clipboard
Adds a user message to the prompt using a ContentBuilderWithAttachment.
Adds a user message to the prompt with media attachments.
Adds a user message to the prompt with optional media attachments.