TextConfig

@Serializable
class TextConfig(val format: TextFormat)

Shape of the text the model must produce.

Structured output lives here and nowhere else in the DeepSeek API: /chat/completions only offers free-form text and json_object, while jsonSchema additionally constrains the answer to a schema of your own.

Example:

val params = responseParams {
text = TextConfig.jsonSchema(
name = "weather",
schema = buildJsonObject {
put("type", "object")
putJsonObject("properties") { putJsonObject("city") { put("type", "string") } }
},
)
}

Constructors

Link copied to clipboard
constructor(format: TextFormat)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The format the answer must take.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String