user

fun user(content: String)(source)

Adds a user message to the prompt.

User messages represent input from the user to the language model.

Example:

user("What is the capital of France?")

Parameters

content

The content of the user message


Adds a user message to the prompt using a TextContentBuilder.

This allows for more complex message construction.

Example:

user {
text("I have a question about programming.")
text("How do I implement a binary search in Kotlin?")
}

Parameters

init

The initialization block for the TextContentBuilder