Learn about response from BLACKBOXAI API
choices
is always an array, even if the model only returns one completion. Each choice will contain a delta
property if a stream was requested and a message
property otherwise. This makes it easier to use the same code for all models.
Here’s the response schema as a TypeScript type:
finish_reason
to one of the following values: tool_calls
, stop
, length
, content_filter
, error
.
Some models and providers may have additional finish reasons. The raw finish_reason string returned by the model is available via the native_finish_reason
property.