Package com.openai.models
Class ResponseFormatTextGrammar.Builder
-
- All Implemented Interfaces:
public final class ResponseFormatTextGrammar.Builder
A builder for ResponseFormatTextGrammar.
-
-
Method Summary
Modifier and Type Method Description final ResponseFormatTextGrammar.Builder
grammar(String grammar)
The custom grammar for the model to follow. final ResponseFormatTextGrammar.Builder
grammar(JsonField<String> grammar)
Sets Builder.grammar to an arbitrary JSON value. final ResponseFormatTextGrammar.Builder
type(JsonValue type)
Sets the field to an arbitrary JSON value. final ResponseFormatTextGrammar.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final ResponseFormatTextGrammar.Builder
putAdditionalProperty(String key, JsonValue value)
final ResponseFormatTextGrammar.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final ResponseFormatTextGrammar.Builder
removeAdditionalProperty(String key)
final ResponseFormatTextGrammar.Builder
removeAllAdditionalProperties(Set<String> keys)
final ResponseFormatTextGrammar
build()
Returns an immutable instance of ResponseFormatTextGrammar. -
-
Method Detail
-
grammar
final ResponseFormatTextGrammar.Builder grammar(String grammar)
The custom grammar for the model to follow.
-
grammar
final ResponseFormatTextGrammar.Builder grammar(JsonField<String> grammar)
Sets Builder.grammar to an arbitrary JSON value.
You should usually call Builder.grammar with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final ResponseFormatTextGrammar.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("grammar")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ResponseFormatTextGrammar.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseFormatTextGrammar.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseFormatTextGrammar.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseFormatTextGrammar.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseFormatTextGrammar.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseFormatTextGrammar build()
Returns an immutable instance of ResponseFormatTextGrammar.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.grammar()
-
-
-
-