Returns the completion status for the most recent response.
Syntax
object.ResponseStatus
Remarks
The ResponseStatus property indicates how the most recent
request completed. This value describes the completion state of the
response returned by the model and is independent of the HTTP status
returned by the provider.
For example, a request may return a successful HTTP status while
the response itself is incomplete, truncated due to token limits, or
cancelled before generation completed. The HttpStatus property
returns the HTTP response status from the provider, while the
ResponseStatus property describes the state of the generated
response.
This property can return one of the following values:
| Constant |
Value |
Description |
| llmResponseUnknown |
0 |
No completion reason was specified by the provider or the
response state was not recognized. |
| llmResponseComplete |
1 |
The response completed normally without interruption. |
| llmResponseLimited |
2 |
The response was truncated because a token limit or context
limit was reached. |
| llmResponseAborted |
3 |
The request was cancelled, interrupted or terminated before
the response completed. |
| llmResponseError |
4 |
An error occurred while processing the request or generating
the response. |
| llmResponseTimeout |
5 |
The request exceeded the configured timeout period. |
A value of llmResponseComplete indicates that the
response was generated normally. Other values may indicate that the
response was truncated due to token limits, interrupted, cancelled,
timed out or terminated because of an error. Applications can use
this property to determine whether the generated response is complete
before processing the returned content.
Data Type
Integer (Int32)
See Also
ElapsedTime Property,
HttpStatus Property,
LastError Property,
LastErrorString Property,
Response Property,
ResponseId Property,
ResponseStatus Property,
Timeout Property,
SendMessage Method
|