How to delete vectore store file atribute

Hello All,

I am trying to manage file attributes, so when I am using the ``file_search` tool, I can filter which files to include in the search.

There is Update vector store file attributes API endpoint that works fine.

POST https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}
{
"attributes": {
  "key1": "value1", 
  "key2": 2
}}

But there is one problem. Once you add an attribute, you can not delete it.

I tried:

  • passing the attributes dictionary without the attribute that I want to delete
  • passing empty attribute dictionary "attributes": {}
  • passing "attributes": null

In all these cases, I get a complete attributes dictionary with all the keys ever created.

1 Like