Closed potatoqualitee closed 5 months ago
It is odd that the loop does not exit even though the status is set to complete.
Could you tell me what command you are running? I'm assuming you are probably using a combination of Start-VectorStoreFileBatch
and Wait-VectorStoreFileBatch
, is that correct?
As a temporary workaround, you might be able to use the -TimeoutSec
parameter of Wait-VectorStoreFileBatch
to avoid the infinite loop.
Thanks for the prompt response! Here is the command it's embedded within
https://github.com/potatoqualitee/PSHelp.Copilot/blob/main/public/New-ModuleAssistant.ps1
Perhaps this is where the infinite loop occurs?
You are using the -StatusForWait
parameter incorrectly, if you specify "completed"
for -StatusForWait
, it will wait until the batch status becomes "other than" completed. If you want to wait until completion, specify "completed" for -StatusForExit
. Also, it is necessary to prevent an infinite loop in such a case, since the batch status may become "failed" due to some problem.
$null = PSOpenAI\Wait-VectorStoreFileBatch -VectorStore $vectorStore -BatchId $filebatch.id -StatusForExit 'completed', 'failed'
The default if nothing is specified is-StatusforWait "in_progress"
, which means that the batch will wait while in_progress and will exit the loop when the status becomes other than in_progress.
Sweet thank you! I'll try that and close this issue if it's resolved.
cant duplicate 😊
Sometimes when I'm uploading a batch of files to the vector store, it hangs here:
I will be showing this command next week at psconf -- would love if it could be fixed by then. ill come back and show you the command once ive made it public, if needed.