Record Class OpenAIResponse
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.sol.models.responses.openai.OpenAIResponse
- Record Components:
id- response idstatus- response statusoutputText- convenience structured output textoutput- response output itemserror- response error payload
- All Implemented Interfaces:
GenericIntegrationResponse
public record OpenAIResponse(String id, String status, String outputText, List<OpenAIResponseOutputItem> output, OpenAIResponseError error)
extends Record
implements GenericIntegrationResponse
Raw response representation for the OpenAI Responses API.
- Version:
- 1.0.9
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionOpenAIResponse(String id, String status, String outputText, List<OpenAIResponseOutputItem> output, OpenAIResponseError error) Creates an instance of aOpenAIResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanisEmpty()Returns true when the response does not contain any structured output text.output()Returns the value of theoutputrecord component.Returns the value of theoutputTextrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OpenAIResponse
public OpenAIResponse(String id, String status, String outputText, List<OpenAIResponseOutputItem> output, OpenAIResponseError error) Creates an instance of aOpenAIResponserecord class.- Parameters:
id- the value for theidrecord componentstatus- the value for thestatusrecord componentoutputText- the value for theoutputTextrecord componentoutput- the value for theoutputrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns true when the response does not contain any structured output text.- Specified by:
isEmptyin interfaceGenericIntegrationResponse- Returns:
- boolean
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
-
status
-
outputText
Returns the value of theoutputTextrecord component.- Returns:
- the value of the
outputTextrecord component
-
output
-
error
-