-
Notifications
You must be signed in to change notification settings - Fork 101
Make Inference API task_settings optional #2994
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
Conversation
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Thanks! This pull request makes a response field optional, which is why I asked a review from static client maintainers here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problems for java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with the team, the conclusion is that making a response field optional is OK. User code handling the case where task_settings is set won't change. (Except in Rust, where it won't compile because the value will be wrapped in std::Option. But the Rust client isn't ready yet.)
Making a field optional in requests is actually more of an issue, because that means constructors need to change to include a variant without that field. Before that change, users will be forced to set this field.
But in any case, since this a bug fix to a tech preview API, this pull request is fine. I would guess that today multiple clients would be failing if given a payload without task settings anyway.
(cherry picked from commit de300c8)
(cherry picked from commit de300c8) Co-authored-by: David Kyle <[email protected]>
task_settings
are optional when creating an endpoint in the Inference API and may not be returned in the GET response. The spec incorrectly hastask_settings
as required for both creation (PUT) and retrieval (GET), this PR changes thatThe Elasticsearch documentation contains an example where an endpoint is created without task_settings ,see creating the ELSER service.