openai/openai-dotnet

[QUESTION] Changes to AddFileToVectorStoreAsync in 2.4.0

Closed this issue · 1 comments

How can we help?

In version 2.4.0, the waitUntilCompletion parameter was removed from the function AddFileToVectorStoreAsync. I made the change reflecting this and now the execution of my code stops after this line executes. I have a breakpoint right after this line that never gets hit. Is there a different way I should be handling the addition of files to a vector store now in the latest version?

Image

Hi @shallonbrous. Thanks for reaching out and we regret that you're experiencing difficulties. The OpenAI service contract for Vector Store creation changed recently in an unexpected way which invalided the previous polling logic. We are in the process of designing a new polling approach for this class of operation. The sample Example01_VectorStoreCreationAsync demonstrates how to poll for completion in the meantime.

I made the change reflecting this and now the execution of my code stops after this line executes. I have a breakpoint right after this line that never gets hit.

This is because the vector store doesn't yet exist at this point, as the operation was not complete. You'll need to poll the creation and wait for completion, then you'll be good to add files. Those, also, will require polling for completion to ensure the upload has completed.