Skip to content

types: Missing type for batch request input and output objects #1937

@alugowski

Description

@alugowski

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

Batch input files are a list of up to 50,000 request input objects, where each one looks like this:

{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o-mini", "messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is 2+2?"}]}}

https://platform.openai.com/docs/api-reference/batch/request-input

I don't see this anywhere in openai.types. It should be there to make it easier to use batches.

Same for the output object, https://platform.openai.com/docs/api-reference/batch/request-output

Additional context

AFAIK the body element's type is Union[EmbeddingCreateParams, CompletionCreateParams]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions