can i have same code for windows??
Sorry I didn’t understand your question. Code for Windows?
I ran into the exact same problem as you. Tried to find a fix for 6 hours now. I give up. I have the assistant created, the vector stores attached with a dataset, and for whatever reason every time a new message thread is created, it is created with no “vector stores”. So when I ask for a specific file, all I get is “File not found”.
Are you attaching the Vector Stores to Assistant? or the Thread? Also, what are the files extension?
Yes I’m attaching the vector stores to the assistant. I can even view the list of all files associated with the assistant and it correctly labels them all. All of them are .PDFs. They worked before very well but now I can’t seem to get them to work since v2 came out.
Can you check the Migration again? Here’s Assistant Migration Guide from V1 to V2. Make sure you didn’t miss any steps.
I ran into the same problem, and the assistant gets mixed up in two files, doesn’t know where to get the information, even if you write down the details. Perhaps because the content of the files is a little similar (one - real estate catalog, the second - a table with detailed data on real estate). Tried to specify ID files in the promt, write a description of the files inside the files themselves, such as: “This file contains information about…”, but nothing helps, the bot still does not navigate them. Tried to download in different formats: txt, json, pdf, did not notice any differences. I would like to hear your suggestions on how to solve this problem. Thank you
@MrFriday what are the differences between attaching Vector stores to assistant or thread/message?
I notice that if you add attachments to message it creates a new vector store, tho if you dont it does not.
Doing it both ways am getting Not used by any resources on the vectore store.
Is this correct?
Thanks!
An attachment direct to a message will create another vector store, auto-persisting for 7 days. Persisting after the thread is deleted. Not able to be removed from a message.

Here is one auto-created by that method:

Attach to a thread or assistant is straightforward. The tool_resources can be modified. They all add chunks to the single search the AI can perform.
@_j already covered it. Attaching VS to Threads gives you more dynamic control on what databases you want the assistant to run in case you are planning to have multiple Vector Stores.
what is a better practice here. I have attached files to Vector Store for now.
is this the correct way, or should I attach it to threads / messages
If the Knowledge Base, with which you wanna have conversation with, donot changes time to time, its better to attach that VS to Assistant. If with every conversation, the Knowledge Base changes, attach that VS to Threads.
Did you want to say with last sentence “attach the Files to Threads” ?
Because I got a bit confused. In API, they want us to attach file ids
thanks a lot.
No, attach Vector Stores to Thread. Read this: https://platform.openai.com/docs/api-reference/threads/createThread#threads-createthread-tool_resources
have same issue. also for me in general even in play ground creating new vector database with file attached not working. it’s showing lie if it would be attached, but then when I try to activate search it gives me error that file is exceed 2 000 000 tokens and wrong id (not id of file i was attaching to new vector, and new file is only 1k tokens). seems to be some open ai bug…
I am also confused with this subject. What is the difference between creating a vector store and linking it to a thread/assistant, and uploading the file and linking it in the thread message directly?
My use case is the each of my users has their own thread and they upload images/files for AI to help them read/summarize etc.
Why should I use vector store rather than simply uploading the file and attaching it to a message on the thread?
Any help is appreciated!
It looks like the main confusion here is about the difference between uploading files and using vector stores. When you upload a file, the system can search through it, but this might not be the fastest or most efficient way, especially if you have a lot of files. Vector stores, on the other hand, are built to store data in a way that makes searching quicker and easier, particularly when dealing with large amounts of data. Plus, once you create a vector store, you can reuse it across different assistants, which is super handy if you need to access the same data in multiple places.