How to access vector store files name

Hi everyone,

I am relating a question, which couldnt been answered at all and I am pretty stuck trying to solve this issue. As I am trying to find a way to get the name of a vector store file name

I am trying to write a chatbot for a mediawiki as my first project and I got my first accomplishments by being able to use uploaded files, that i saved in a vector store and using the assistants API to get pretty good answers so far! :slight_smile:

My chatbot shall be able to answer questions based on the uploaded files, write new articles when the user asks him to and edit existing files. As been mentioned above, I already accomplished creating files by title and content and reading files through the file_search function, but when it comes to editing files, I am trying to delete the old ones and create new ones, which is working except deleting the old ones.

I would love to access the name of the file in the vector store, but cant find a way how to, because in the documentation there is no response for a given vector store file name, only for the id. But I cant find a good way to connect the id and the file name (which doesnt exist on the openAI side) and to be honest its driving me crazy! How isnt there a response for a given vector store file name? Shouldnt this be the first thing to add?

So I tried to create a new vector store, where I overwrite the file_id by giving its title to it, but when a file is uploaded into the vector store, the file id gets overwritten by openai…

I hope my question is somewhat understandable as english is not my motherlanguage :slight_smile:

Thanks for any help

1 Like

Hey there! :slightly_smiling_face:

Same issue here. That seems to be still unresolved - I see other folks requesting this: Get the file name from a vector_store_id and file_id

This is not how vector store works. The AI can’t manipulate or “see” files in their entirety, and only a file ID is returned in Assistants with a chunk.

It is only a search tool. The data is broken into chunks of extracted text. The Assistant can only write a query, and then receive some of the top-ranked text chunks as results to use as knowledge.

Seems you can use files api, not by vector store file approach, client.beta.vector_stores.files.retrieve wont return file name
###################################
vecStoreFilelist= client.beta.vector_stores.files.list( vector_store_id = vectoreStoreId )
for item in vecStoreFilelist:
tmpF = client.files.retrieve(file_id=item.id)

the return object will contain file name
FileObject(id=‘xxxxxxxxxxxxxx’, bytes=4478717, created_at=1733670074, filename=‘105521.json’, object=‘file’, purpose=‘assistants’, status=‘processed’, status_details=None)