SystemPrompt

data class SystemPrompt(val text: String, val type: String = "text", val cacheControl: MessageCreateParams.SystemPrompt.CacheControl? = null, val citations: List<MessageCreateParams.SystemPrompt.Citation>? = null)(source)

System prompt for Claude. A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role.

Constructors

Link copied to clipboard
constructor(text: String, type: String = "text", cacheControl: MessageCreateParams.SystemPrompt.CacheControl? = null, citations: List<MessageCreateParams.SystemPrompt.Citation>? = null)

Types

Link copied to clipboard
data class CacheControl(val type: String = "ephemeral")

Cache control configuration.

Link copied to clipboard
data class Citation(val citedText: String, val documentIndex: Int, val documentTitle: String? = null, val endCharIndex: Int, val startCharIndex: Int, val type: String = "char_location")

Citation for referenced content in the system prompt.

Properties

Link copied to clipboard

Create a cache control breakpoint at this content block.

Link copied to clipboard

Citations for the system prompt.

Link copied to clipboard

The text content of the system prompt.

Link copied to clipboard

The type of the system prompt. Always "text".