io.enterpriseai.model.ChatResponse
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/model/ChatResponse.java. Back to the Java SDK reference index.
note
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Model ChatResponse
Chat completion response with the gateway headers.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
raw | JsonNode | yes | OpenAI compatible JSON body |
decisionId | String | yes | X-EAI-Decision-Id |
costEstimated | String | yes | X-EAI-Cost-Estimated |
costMeasured | String | yes | X-EAI-Cost-Measured |
ChatResponse.content
String content()
Text of the first choice, empty when absent.
This element takes no parameter.
Returns: String. The choices[0].message.content text, or an empty string.
ChatResponse.model
String model()
Model that actually answered.
This element takes no parameter.
Returns: String. The model field of the body, or null.
ChatResponse.usage
JsonNode usage()
Token usage of the call.
This element takes no parameter.
Returns: JsonNode. The usage node of the body, a MissingNode when absent.