Package com.openai.models
Interface ChatCompletionCreateParams.ResponseFormat.Visitor
-
- All Implemented Interfaces:
public interface ChatCompletionCreateParams.ResponseFormat.Visitor<T extends Object>
An interface that defines how to map each variant of ResponseFormat to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract T
visitText(ResponseFormatText text)
abstract T
visitJsonObject(ResponseFormatJsonObject jsonObject)
abstract T
visitJsonSchema(ResponseFormatJsonSchema jsonSchema)
T
unknown(JsonValue json)
Maps an unknown variant of ResponseFormat to a value of type T. -
-
Method Detail
-
visitText
abstract T visitText(ResponseFormatText text)
-
visitJsonObject
abstract T visitJsonObject(ResponseFormatJsonObject jsonObject)
-
visitJsonSchema
abstract T visitJsonSchema(ResponseFormatJsonSchema jsonSchema)
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ResponseFormat to a value of type T.
An instance of ResponseFormat can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-