Expand description
classify.run replies and the provider’s answer objects.
After admission the batch never fails as a whole: every item gets
answers or error, at its position in the request.
Structs§
- Answer
- One answer, the provider’s answer object as returned. Which members are present depends on the question type:
- Classify
Reply - The
classify.runreply. - Item
Result - One item’s outcome:
answersif it succeeded,errorif it failed, never both. - Usage
- Token usage. A count the provider did not report is absent, never zero.
Functions§
- check_
reply - Check a reply against the request it answers: the same batch and model,
one item per request item in request order, each with exactly one of
answersanderror, and every answered item answering exactly the request’s questions with answers of the asked type. The error names the first problem. - sum_
usage - The batch’s usage: each count summed over the items that reported it, and absent when none did.