Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
alugowski opened this issue Dec 11, 2024 · 0 comments
Open
1 task done

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

alugowski opened this issue Dec 11, 2024 · 0 comments

Comments

@alugowski
Copy link

alugowski commented Dec 11, 2024

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]

@alugowski alugowski changed the title Missing type for batch request input and output objects types: Missing type for batch request input and output objects Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant