Versions in this module Expand all Collapse all v0 v0.1.0 Aug 1, 2026 Changes in this version + const BatchCancelled + const BatchCancelling + const BatchCompleted + const BatchExpired + const BatchFailed + const BatchFinalizing + const BatchInProgress + const BatchValidating + const CompletionWindow24h + const EndpointChatCompletions + const ErrorTypeInvalidRequest + const ErrorTypeNotFound + const ErrorTypeServer + const MaxLineBytes + const ObjectBatch + const ObjectFile + const ObjectList + const PurposeBatch + const PurposeBatchOutput + func ParseRequests(r io.Reader, endpoint string) ([]ParsedRequest, []LineError) + func WriteOutputs(w io.Writer, lines []BatchRequestOutput) error + type APIError struct + Error ErrorBody + func NewError(message, errType string) APIError + func NewInvalidRequest(message string) APIError + type Batch struct + CancelledAt *int64 + CancellingAt *int64 + CompletedAt *int64 + CompletionWindow string + CreatedAt int64 + Endpoint string + ErrorFileID string + Errors *ErrorList + ExpiredAt *int64 + ExpiresAt *int64 + FailedAt *int64 + FinalizingAt *int64 + ID string + InProgressAt *int64 + InputFileID string + Metadata map[string]string + Object string + OutputFileID string + RequestCounts RequestCounts + Status string + type BatchError struct + Code string + Line *int + Message string + Param string + type BatchRequestInput struct + Body json.RawMessage + CustomID string + Method string + URL string + type BatchRequestOutput struct + CustomID string + Error *OutputError + ID string + Response *OutputResponse + type ErrorBody struct + Code *string + Message string + Param *string + Type string + type ErrorList struct + Data []BatchError + Object string + type FileObject struct + Bytes int64 + CreatedAt int64 + Filename string + ID string + Object string + Purpose string + type LineError struct + Line int + Message string + func (e LineError) Error() string + type ListResponse struct + Data []T + HasMore bool + Object string + func NewList[T any](data []T) ListResponse[T] + type OutputError struct + Code string + Message string + type OutputResponse struct + Body json.RawMessage + RequestID string + StatusCode int + type ParsedRequest struct + Body json.RawMessage + CustomID string + Model string + Seq int + type RequestCounts struct + Completed int + Failed int + Total int