-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Adding upload file and poll operation with sample and test #31928
base: feature/azure-ai-sdk
Are you sure you want to change the base?
Adding upload file and poll operation with sample and test #31928
Conversation
await new Promise(resolve => setTimeout(resolve, sleepInterval)); | ||
const updatedResult = await context.path(`/files/${result.body.id}`, result.body.id).get(options); | ||
result.body = updatedResult.body; | ||
} |
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.
Provide a way to stop polling.
@@ -31,6 +31,19 @@ export async function uploadFile( | |||
return result.body; | |||
} | |||
|
|||
/** Uploads a file for use by other operations. */ | |||
export async function uploadFileAndPoll( |
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.
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.
@ganeshyb would we want to use an LRO 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.
I am not sure actually, could you help me understand what the traffic will look like?
We leverage the first request to upload the file successfully but when this request is back this doesn't mean the server side is completed. So we have following requests to poll status? Will this be the traffic?
No description provided.