Text Config
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") } }
},
)
}Content copied to clipboard