JsonSchemaResponseFormat.Builder Class
- java.
lang. Object - com.
microsoft. semantickernel. orchestration. responseformat. JsonSchemaResponseFormat. Builder
- com.
public static class JsonSchemaResponseFormat.Builder
A builder for the JsonSchemaResponseFormat class.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| Builder() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Json |
build()
Builds the JsonSchemaResponseFormat instance. |
| Builder |
setJsonResponseSchema(JsonResponseSchema jsonResponseSchema)
Sets the JSON response schema. |
| Builder |
setJsonSchema(String jsonSchema)
Sets the JSON schema. |
| Builder |
setName(String name)
Sets the name of the JSON schema. |
| Builder |
setResponseFormat(Class<?> clazz)
Sets the response format. |
| Builder |
setResponseFormat(Class<?> clazz, ResponseSchemaGenerator responseSchemaGenerator)
Sets the response format. |
| Builder |
setStrict(boolean strict)
Sets whether the schema is strict. |
Methods inherited from java.lang.Object
Constructor Details
Builder
public Builder()
Method Details
build
public JsonSchemaResponseFormat build()
Builds the JsonSchemaResponseFormat instance.
Returns:
setJsonResponseSchema
public JsonSchemaResponseFormat.Builder setJsonResponseSchema(JsonResponseSchema jsonResponseSchema)
Sets the JSON response schema.
Parameters:
Returns:
setJsonSchema
public JsonSchemaResponseFormat.Builder setJsonSchema(String jsonSchema)
Sets the JSON schema.
Parameters:
Returns:
setName
public JsonSchemaResponseFormat.Builder setName(String name)
Sets the name of the JSON schema.
Parameters:
Returns:
setResponseFormat
public JsonSchemaResponseFormat.Builder setResponseFormat(Class clazz)
Sets the response format. Uses Jackson to generate the schema from the clazz
Parameters:
Returns:
setResponseFormat
public JsonSchemaResponseFormat.Builder setResponseFormat(Class clazz, ResponseSchemaGenerator responseSchemaGenerator)
Sets the response format.
Parameters:
Returns:
setStrict
public JsonSchemaResponseFormat.Builder setStrict(boolean strict)
Sets whether the schema is strict.
Parameters:
Returns: