How to Attach a File to a Vector Using OpenAI API Action?

This topic was automatically generated from Slack. You can find the original thread here.

Area : OpenAI API action
Issue : How do i attach a file to a vector using an Action.

Steps

1 - I created a vector store and have its ID
2 - I uploaded a file to OpenAI via Action “Upload File”

Problem

I cannot figure out how to Associate a file with a Vector store. I looked in the actions… Is there something I am missing. I just need to link a file to the vector store then my assistant can use its information in RAG.

Is their an action I am missing?

How the Vector Store is used currently in your OpenAI calls?

I believe the quickest is the assign the Vector file when the file is uploaded

https://platform.openai.com/docs/api-reference/vector-stores-files/createFile

We do not currently have it but from the API docs it looks like it is available.

curl https://api.openai.com/v1/vector_stores/vs_abc123/files \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-Type: application/json" \
    -H "OpenAI-Beta: assistants=v2" \
    -d '{
      "file_id": "file-abc123"
    }'

Hi , thank you for the clarification. I’ve created a ticket here to integrate OpenAI VectorStore & VectorStore Files APIs as Pipedream actions: [ACTION] OpenAI - Vector Store and Vector Store Files actions · Issue #14432 · PipedreamHQ/pipedream · GitHub

Please subscribe to the ticket to be noticed when it’s available

This is amazing. Thank you so much. With the explosion of RAG this will make pipedream a go to platform for Agentic workers I feel.
I will definitely be telling folks I use pipedream at the OpenAI Dev day next week :grinning:

Works Perfectly!!! Thank you!!!