Using a file via the assistant by the API

Hello,
I’m relying on you because I can’t do it and everything I try fails. Whereas 3 weeks ago it worked… I’m lost.

I’m trying to query a PDF with GPT 4o via an API using a wizard that has the “file search” option enabled.

Today I :

  1. Create a vector store
  2. Upload the file
  3. Store the file in the vector store
  4. Create a thread
  5. Send a message to the wizard in question with the parameter :
    -Wizard name
  • The prompt
  • Thread ID
  • Selected model
  • File search tool enabled
  • And the ID of the vector store I created in the “File Search resources”.
  • Tool choice on Auto

And yet GPT keeps telling me it doesn’t have access to the file…

What am I doing wrong?

Thanks for your help

1 Like

I would use vector stores in two specific ways:

  • attach to assistant, as part of its skill, with accompanying instruction about the contents to be found in myfiles_browser
  • attach files within messages, automatically creating expiring vector store also included in the search

A thread-attached vector store doesn’t follow a clear pattern.

Exactly! That’s what I’d like to do too, but I can’t do it with API. Case 2 would be perfect for me.

Does anyone know why? Where am I going wrong with my process? (CF first post)

Thanks a lot!