Package-level declarations

Types

Link copied to clipboard

A builder for constructing attachments for prompt messages.

Link copied to clipboard
data class MessageContent(val content: String, val attachments: List<Attachment> = emptyList())

Message content with attachments

Link copied to clipboard

A message content builder class to support both text and attachments.

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
data class Prompt(val messages: List<Message>, val id: String, val params: LLMParams = LLMParams())

Represents a data structure for a prompt, consisting of a list of messages, a unique identifier, and optional parameters for language model settings.

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
fun prompt(existing: Prompt, clock: Clock = Clock.System, build: PromptBuilder.() -> Unit): Prompt

Extends an existing prompt using the Prompt DSL.

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

Creates a new prompt using the Prompt DSL.