Class ResponseFormatTextConfig
- 
                    
                    - All Implemented Interfaces:
 
 public final class ResponseFormatTextConfigAn object specifying the format that the model must output. Configuring { "type": "json_schema" }enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is { "type": "text" }with no additional options.Not recommended for gpt-4o and newer models: Setting to { "type": "json_object" }enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schemais preferred for models that support it.
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public interfaceResponseFormatTextConfig.VisitorAn interface that defines how to map each variant of ResponseFormatTextConfig to a value of type T. 
 - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        textfinal Optional<ResponseFormatText> text() Default response format. Used to generate text responses. 
 - 
                                        jsonSchemafinal Optional<ResponseFormatTextJsonSchemaConfig> jsonSchema() JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs. 
 - 
                                        jsonObjectfinal Optional<ResponseFormatJsonObject> jsonObject() JSON object response format. An older method of generating JSON responses. Using json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
 - 
                                        isJsonSchemafinal Boolean isJsonSchema() 
 - 
                                        isJsonObjectfinal Boolean isJsonObject() 
 - 
                                        asTextfinal ResponseFormatText asText() Default response format. Used to generate text responses. 
 - 
                                        asJsonSchemafinal ResponseFormatTextJsonSchemaConfig asJsonSchema() JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs. 
 - 
                                        asJsonObjectfinal ResponseFormatJsonObject asJsonObject() JSON object response format. An older method of generating JSON responses. Using json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
 - 
                                        acceptfinal <T extends Any> T accept(ResponseFormatTextConfig.Visitor<T> visitor) 
 - 
                                        validatefinal ResponseFormatTextConfig validate() 
 - 
                                        ofTextfinal static ResponseFormatTextConfig ofText(ResponseFormatText text) Default response format. Used to generate text responses. 
 - 
                                        ofJsonSchemafinal static ResponseFormatTextConfig ofJsonSchema(ResponseFormatTextJsonSchemaConfig jsonSchema) JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs. 
 - 
                                        ofJsonObjectfinal static ResponseFormatTextConfig ofJsonObject(ResponseFormatJsonObject jsonObject) JSON object response format. An older method of generating JSON responses. Using json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-