Get the file name from a vector_store_id and file_id

Using the platform.openai.com website, I see my list of uploaded files. I select one, I see that it has a filename. A copy its vector_store_id and file_id. However, when I retrieve this file using the API, the filename does not apear. How to solve this?

file=client.beta.vector_stores.files.retrieve(vector_store_id=vector_store_id, file_id=file_id)
print(file.to_json())

{
  "id": "file-Z80edd3ZDAkbrm43V....",
  "created_at": 1724176263,
  "last_error": null,
  "object": "vector_store.file",
  "status": "completed",
  "usage_bytes": 3616248,
  "vector_store_id": "vs_GX6dQ1CuAlkpYKVrHB....",
  "chunking_strategy": {
    "static": {
      "chunk_overlap_tokens": 400,
      "max_chunk_size_tokens": 800
    },
    "type": "static"
  }
}
1 Like

Same issue here. name is not returned from retrieve method.
Lack the name attribute for VectorStoreFile. openai version openai-1.42.0

Why they can’t put the file name on the vector file object is crazy. If you look at the vector files in their system it show the name. Crazy

1 Like

Exactly the same problem here. I have a vector file store with several files and I want to make sure that there are no redundant uploads. It would be very easy if I could check the actual uploaded file attributes (name, size etc)

2 Likes

it’s things like this that make me really hope the Assistants API is not going to be sunsetted for something else. i have no idea why they wouldn’t have added this by now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.