Package-level declarations

Types

Link copied to clipboard

A builder for constructing parts for prompt messages. All parts are added to a list in declaration order and can be retrieved through the build method.

Link copied to clipboard

A base utility class for building and manipulating content based on the text. This class can be extended to support more types of text-based content, e.g. text with attachments or some metadata.

Link copied to clipboard
open class ModerationCategory(val name: String)

Represents categories for content moderation used to classify potentially harmful or inappropriate content. These categories help identify specific types of violations that content may fall under.

Link copied to clipboard
data class ModerationCategoryResult(val detected: Boolean, val confidenceScore: Double? = null, val appliedInputTypes: List<ModerationResult.InputType> = emptyList())

Represents the detailed result of moderating a specific category of content.

Link copied to clipboard

Represents the result of a content moderation request.

Link copied to clipboard

A builder class for creating prompts using a DSL approach.

Link copied to clipboard
annotation class PromptDSL

Marker annotation for the Prompt DSL.

Functions

Link copied to clipboard

Constructs an empty instance of the Prompt class with no messages, default parameters, and an empty identifier. This empty prompt can be used as a default or placeholder.

Link copied to clipboard
fun prompt(existing: Prompt, clock: KoogClock = KoogClock.System, build: PromptBuilder.() -> Unit): Prompt

Extends an existing prompt using the Prompt DSL.

fun prompt(id: String, params: LLMParams = LLMParams(), clock: KoogClock = KoogClock.System, build: PromptBuilder.() -> Unit): Prompt

Creates a new prompt using the Prompt DSL.