-
Notifications
You must be signed in to change notification settings - Fork 115
Adds EIS POST inference details #3940
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 |
|
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
| import { Id } from '@_types/common' | ||
|
|
||
|
|
||
| export type OmittedChatCompletion = Omit<RequestChatCompletion, 'urls' | 'path_parts'>; |
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.
@swallez @pquentin we're trying to override the urls and path_parts, we're getting errors when trying to run make generate. Is this a valid solution?
Technically we don't really have to do this, I'm just curious if it's possible. UnifiedRequest will likely be identical to the Request interface we're defining in this file. We are trying to rename the inference_id path part to eis_inference_id just to make the documentation a little clearer.
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.
This option seems to work:
import type { Request as RequestChatCompletion } from '../chat_completion_unified/UnifiedRequest'
export interface Request extends RequestChatCompletion {}
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.
You can have a RequestChatCompletionBase and extend it in different APIs, which is close to what your last comment does, but Omit won't work indeed. It's also OK to repeat yourself here.
| "path": "/_inference/chat_completion/{eis_inference_id}/_stream", | ||
| "methods": ["POST"], | ||
| "parts": { | ||
| "task_type": { |
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.
I think we can remove the task_type object since we've defined chat_completion in the URL.
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.
the idea is to define a task type and use it as a variable because we don't know whether new tasks will be added, so we want to already have the structure prepared for the future
| import { Id } from '@_types/common' | ||
|
|
||
|
|
||
| export type OmittedChatCompletion = Omit<RequestChatCompletion, 'urls' | 'path_parts'>; |
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.
Doesn't look like this is going to work, so either copying the whole UnifiedRequest or creating an interface that contains the fields that are shared between UnifiedRequest and this file excluding urls and path_parts.
bfa783d to
913d585
Compare
|
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
|
Made some changes:
|
output/schema/validation-errors.json
Outdated
| }, | ||
| "inference.post_eis_chat_completion": { | ||
| "request": [ | ||
| "Request: url path '/_inference/{task_type}/{eis_inference_id}/_stream' not found in the json spec" |
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.
Hmm I wonder why we're getting this validation error now 🤔 Is it because we only define a chat_completion task type in the types?
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.
forgot to regenerate output after path fix ^^" also needed to fix the json spec accordingly, pushing a fix now
|
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-3940-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f729638171c6269ed25f626f478c8520e2db5ccf
# Push it to GitHub
git push --set-upstream origin backport-3940-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.xThen, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-3940-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f729638171c6269ed25f626f478c8520e2db5ccf
# Push it to GitHub
git push --set-upstream origin backport-3940-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.0 9.0
# Navigate to the new working tree
cd .worktrees/backport-9.0
# Create a new branch
git switch --create backport-3940-to-9.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f729638171c6269ed25f626f478c8520e2db5ccf
# Push it to GitHub
git push --set-upstream origin backport-3940-to-9.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.0Then, create a pull request where the |
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co> Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
* Adds EIS POST inference details (#3940) Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co> Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
Overview
This PR adds the EIS POST inference API use case.