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

Add support for OpenAI's Predicted Outputs #1145

Open
aretrace opened this issue Nov 5, 2024 · 3 comments
Open

Add support for OpenAI's Predicted Outputs #1145

aretrace opened this issue Nov 5, 2024 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aretrace
Copy link

aretrace commented Nov 5, 2024

OpenAI released a new api feature called Predicted Outputs. It's designed to reduce latency when most of the output is already known in advance. This is especially useful for tasks that involve minor changes to existing content (maybe like structured data transformations 😁).

@karljuhlthefool
Copy link

Upvote. Although function calling isn't supported with predicted outputs, the json mode should be implemented.

@jxnl
Copy link
Collaborator

jxnl commented Jan 9, 2025

we mostly pass in the arguments, does this not work by default?

@jxnl jxnl added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 9, 2025
@sreeprasannar
Copy link
Contributor

The input should take care of itself. i.e. it should be possible to pass in the arguments all the way to the openai endpoint. From the completion response, it's useful to surface the two new fields accepted_prediction_tokens, rejected_prediction_tokens to the caller.
@jxnl Here's a PR - #1312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants