类 JsonSchema
java.lang.Object
io.agentscope.core.formatter.openai.dto.JsonSchema
JSON Schema definition for structured outputs.
This class represents a JSON Schema that defines the structure of the expected response from the model.
Example usage:
JsonSchema schema = JsonSchema.builder()
.name("MathResponse")
.description("Response with answer and steps")
.schema(Map.of(
"type", "object",
"properties", Map.of(
"answer", Map.of("type", "number"),
"steps", Map.of("type", "array", "items", Map.of("type", "string"))
),
"required", List.of("answer", "steps"),
"additionalProperties", false
))
.strict(true)
.build();
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
-
构造器详细资料
-
JsonSchema
public JsonSchema()
-
-
方法详细资料
-
getName
-
setName
-
getDescription
-
setDescription
-
getSchema
-
setSchema
-
getStrict
-
setStrict
-
builder
-