Class DashScopeResponseFormat.JsonSchemaConfig.Builder
java.lang.Object
com.alibaba.cloud.ai.dashscope.api.DashScopeResponseFormat.JsonSchemaConfig.Builder
- Enclosing class:
- DashScopeResponseFormat.JsonSchemaConfig
Builder class for constructing instances of
DashScopeResponseFormat.JsonSchemaConfig.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance ofDashScopeResponseFormat.JsonSchemaConfig.description(String description) Sets the schema description.Sets the schema name.Sets the JSON Schema object.Sets the strict mode to the JSON Schema.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the schema name.- Parameters:
name- the schema name- Returns:
- this builder instance
-
description
Sets the schema description.- Parameters:
description- the schema description- Returns:
- this builder instance
-
schema
Sets the JSON Schema object.- Parameters:
schema- the JSON Schema object- Returns:
- this builder instance
-
strict
Sets the strict mode to the JSON Schema.- Parameters:
strict- true to enable strict mode (recommended), false to disable- Returns:
- this builder instance
-
build
Builds a new instance ofDashScopeResponseFormat.JsonSchemaConfig.- Returns:
- a new instance of
DashScopeResponseFormat.JsonSchemaConfig
-