You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The support for batch requests is incomplete. Specifically, the OpenAI API reference specifies that the output files containing the results of the batched operations contain request output objects in the format described here: https://platform.openai.com/docs/api-reference/batch/request-output
However, the struct types corresponding to these objects are missing from this library.
Draft solution
type BatchRequestOutputError struct {
Code string `json:"code"`
Message string `json:"message"`
}
type BatchRequestChatCompletionResponse struct {
StatusCode int `json:"status_code"`
RequestId string `json:"request_id"`
Body ChatCompletionResponse `json:"body"`
}
type BatchRequestChatCompletionOutput {
Id string `json:"id"`
CustomId string `json:"custom_id"`
Response *BatchRequestChatCompletionResponse `json:"response"`
Error *BatchRequestOutputError `json:"error"`
}
and similarly for any other supported batch request types.
Alternatively, these wrapper types could be implemented with generics (they were invented for this, after all), but AFAIK generics are not used elsewhere in the project, so you may not want to introduce them for such a trivial addition.
The text was updated successfully, but these errors were encountered:
The support for batch requests is incomplete. Specifically, the OpenAI API reference specifies that the output files containing the results of the batched operations contain request output objects in the format described here: https://platform.openai.com/docs/api-reference/batch/request-output
However, the struct types corresponding to these objects are missing from this library.
Draft solution
and similarly for any other supported batch request types.
Alternatively, these wrapper types could be implemented with generics (they were invented for this, after all), but AFAIK generics are not used elsewhere in the project, so you may not want to introduce them for such a trivial addition.
The text was updated successfully, but these errors were encountered: