Class JsonObjectSchema.Builder
java.lang.Object
dev.langchain4j.model.chat.request.json.JsonObjectSchema.Builder
- Enclosing class:
JsonObjectSchema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBooleanProperty
(String name) Adds a single boolean property to the properties of this JSON object.addBooleanProperty
(String name, String description) Adds a single boolean property with a description to the properties of this JSON object.addEnumProperty
(String name, List<String> enumValues) Adds a single enum property to the properties of this JSON object.addEnumProperty
(String name, List<String> enumValues, String description) Adds a single enum property with a description to the properties of this JSON object.addIntegerProperty
(String name) Adds a single integer property to the properties of this JSON object.addIntegerProperty
(String name, String description) Adds a single integer property with a description to the properties of this JSON object.additionalProperties
(Boolean additionalProperties) addNumberProperty
(String name) Adds a single number property to the properties of this JSON object.addNumberProperty
(String name, String description) Adds a single number property with a description to the properties of this JSON object.addProperties
(Map<String, JsonSchemaElement> properties) Adds all properties in the parameter Map to the properties of this JSON object.addProperty
(String name, JsonSchemaElement jsonSchemaElement) Adds a single property to the properties of this JSON object.addStringProperty
(String name) Adds a single string property to the properties of this JSON object.addStringProperty
(String name, String description) Adds a single string property with a description to the properties of this JSON object.build()
definitions
(Map<String, JsonSchemaElement> definitions) Used together withJsonReferenceSchema
when recursion is required.description
(String description) properties
(Map<String, JsonSchemaElement> properties) Deprecated, for removal: This API element is subject to removal in a future version.since it has the misleading side effect of deleting all other properties eventually added so far.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
-
properties
@Deprecated(forRemoval=true) public JsonObjectSchema.Builder properties(Map<String, JsonSchemaElement> properties) Deprecated, for removal: This API element is subject to removal in a future version.since it has the misleading side effect of deleting all other properties eventually added so far. UseaddProperties(Map)
instead.Sets the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addProperties
Adds all properties in the parameter Map to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addProperty
Adds a single property to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addStringProperty
Adds a single string property to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addStringProperty
Adds a single string property with a description to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addIntegerProperty
Adds a single integer property to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addIntegerProperty
Adds a single integer property with a description to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addNumberProperty
Adds a single number property to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addNumberProperty
Adds a single number property with a description to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addBooleanProperty
Adds a single boolean property to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addBooleanProperty
Adds a single boolean property with a description to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addEnumProperty
Adds a single enum property to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
addEnumProperty
public JsonObjectSchema.Builder addEnumProperty(String name, List<String> enumValues, String description) Adds a single enum property with a description to the properties of this JSON object. Please note thatrequired(List)
should be set explicitly if you want the properties to be mandatory.- See Also:
-
required
-
required
-
additionalProperties
-
definitions
Used together withJsonReferenceSchema
when recursion is required. -
build
-