Class JsonSchemaResponseFormat.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.orchestration.responseformat.JsonSchemaResponseFormat.Builder
-
- Enclosing class:
- JsonSchemaResponseFormat
public static class JsonSchemaResponseFormat.Builder extends Object
A builder for theJsonSchemaResponseFormatclass.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonSchemaResponseFormatbuild()Builds theJsonSchemaResponseFormatinstance.JsonSchemaResponseFormat.BuildersetJsonResponseSchema(JsonResponseSchema jsonResponseSchema)Sets the JSON response schema.JsonSchemaResponseFormat.BuildersetJsonSchema(String jsonSchema)Sets the JSON schema.JsonSchemaResponseFormat.BuildersetName(String name)Sets the name of the JSON schema.JsonSchemaResponseFormat.BuildersetResponseFormat(Class<?> clazz)Sets the response format.JsonSchemaResponseFormat.BuildersetResponseFormat(Class<?> clazz, ResponseSchemaGenerator responseSchemaGenerator)Sets the response format.JsonSchemaResponseFormat.BuildersetStrict(boolean strict)Sets whether the schema is strict.
-
-
-
Method Detail
-
setResponseFormat
public JsonSchemaResponseFormat.Builder setResponseFormat(Class<?> clazz, ResponseSchemaGenerator responseSchemaGenerator)
Sets the response format.- Parameters:
clazz- The class.responseSchemaGenerator- The response schema generator.- Returns:
- The builder.
-
setResponseFormat
public JsonSchemaResponseFormat.Builder setResponseFormat(Class<?> clazz)
Sets the response format. Uses Jackson to generate the schema from theclazz- Parameters:
clazz- The class.- Returns:
- The builder.
-
setJsonResponseSchema
public JsonSchemaResponseFormat.Builder setJsonResponseSchema(JsonResponseSchema jsonResponseSchema)
Sets the JSON response schema.- Parameters:
jsonResponseSchema- The JSON response schema.- Returns:
- The builder.
-
setJsonSchema
public JsonSchemaResponseFormat.Builder setJsonSchema(String jsonSchema)
Sets the JSON schema.- Parameters:
jsonSchema- The JSON schema.- Returns:
- The builder.
-
setName
public JsonSchemaResponseFormat.Builder setName(String name)
Sets the name of the JSON schema.- Parameters:
name- The schema name.- Returns:
- The builder.
-
setStrict
public JsonSchemaResponseFormat.Builder setStrict(boolean strict)
Sets whether the schema is strict.- Parameters:
strict- Whether the schema is strict.- Returns:
- The builder.
-
build
public JsonSchemaResponseFormat build()
Builds theJsonSchemaResponseFormatinstance.- Returns:
- The
JsonSchemaResponseFormatinstance.
-
-