OpenAI Vector Store Integration avatar

OpenAI Vector Store Integration

Try for free

No credit card required

Go to Store
OpenAI Vector Store Integration

OpenAI Vector Store Integration

jiri.spilka/openai-vector-store-integration
Try for free

No credit card required

The Apify OpenAI Vector Store integration uploads data from Apify Actors to the OpenAI Vector Store linked to OpenAI Assistant.

You can access the OpenAI Vector Store Integration programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.0",
5    "x-build-id": "GaZNaBs4blsspWxij"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/jiri.spilka~openai-vector-store-integration/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-jiri.spilka-openai-vector-store-integration",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/jiri.spilka~openai-vector-store-integration/runs": {
50      "post": {
51        "operationId": "runs-sync-jiri.spilka-openai-vector-store-integration",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/jiri.spilka~openai-vector-store-integration/run-sync": {
93      "post": {
94        "operationId": "run-sync-jiri.spilka-openai-vector-store-integration",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "required": [
134          "vectorStoreId",
135          "datasetFields",
136          "openaiApiKey"
137        ],
138        "properties": {
139          "vectorStoreId": {
140            "title": "Vector Store ID",
141            "type": "string",
142            "description": "Vector Store ID where the data will be stored"
143          },
144          "openaiApiKey": {
145            "title": "OpenAI API KEY",
146            "type": "string",
147            "description": "OpenAI API KEY"
148          },
149          "assistantId": {
150            "title": "Assistant ID",
151            "type": "string",
152            "description": "The ID of an OpenAI Assistant. This parameter is required only when a file exceeds the OpenAI size limit of 5,000,000 tokens (as of 2024-04-23).\n\n When necessary, the model associated with the assistant is utilized to count tokens and split the large file into smaller, manageable segments."
153          },
154          "datasetFields": {
155            "title": "A list of dataset fields which should be selected from the dataset",
156            "type": "array",
157            "description": "A list of dataset fields which should be selected from the items, only these dataset fields will remain in the resulting record objects.\n\n For example, when using the website content crawler, you might select dataset fields such as `text` and `url`, and `metadata.title` among others, to be included in the vector store file.",
158            "default": [
159              "url",
160              "text"
161            ]
162          },
163          "filePrefix": {
164            "title": "Delete/Create vector store files with a prefix",
165            "minLength": 5,
166            "type": "string",
167            "description": "Using a file prefix helps with the management of vector store file updates by eliminating the need to track each file's ID. For instance, if you set the filePrefix to 'apify-advisor', the Actor will initially locate all files in the vector store with this prefix. Subsequently, it will delete these files and create new ones, also prefixed accordingly."
168          },
169          "fileIdsToDelete": {
170            "title": "Array of vector store file ids to delete",
171            "type": "array",
172            "description": "Delete specified file ids associated with vector store. This can be useful when one needs to delete files that are no longer needed."
173          },
174          "saveCrawledFiles": {
175            "title": "Save crawled files (docs, pdf, pptx) to OpenAI File Store",
176            "type": "boolean",
177            "description": "Save files from Apify's key-value store to OpenAI's file store. Useful when utilizing Apify’s website content crawler with the 'saveFiles' option, allowing the found files to be directly stored.",
178            "default": true
179          },
180          "datasetId": {
181            "title": "Apify's Dataset ID",
182            "type": "string",
183            "description": "The Dataset ID is provided automatically when the actor is set up as an integration. You can fill it in explicitly here to enable debugging of the actor"
184          },
185          "keyValueStoreId": {
186            "title": "Apify's Key-value store ID (source for json, pdf, pptx files) ",
187            "type": "string",
188            "description": "This is the ID for the Key-value store on Apify, which serves as the data source for json, pdf, and pptx files. This ID is automatically provided when the actor is integrated. However, you can manually enter the ID here for debugging purposes."
189          },
190          "saveInApifyKeyValueStore": {
191            "title": "Save all created files in the Apify's key-value store",
192            "type": "boolean",
193            "description": "Save all created files in the Apify's Key-Value Store to easily check and retrieve all files (this is typically used when debugging)",
194            "default": false
195          }
196        }
197      },
198      "runsResponseSchema": {
199        "type": "object",
200        "properties": {
201          "data": {
202            "type": "object",
203            "properties": {
204              "id": {
205                "type": "string"
206              },
207              "actId": {
208                "type": "string"
209              },
210              "userId": {
211                "type": "string"
212              },
213              "startedAt": {
214                "type": "string",
215                "format": "date-time",
216                "example": "2025-01-08T00:00:00.000Z"
217              },
218              "finishedAt": {
219                "type": "string",
220                "format": "date-time",
221                "example": "2025-01-08T00:00:00.000Z"
222              },
223              "status": {
224                "type": "string",
225                "example": "READY"
226              },
227              "meta": {
228                "type": "object",
229                "properties": {
230                  "origin": {
231                    "type": "string",
232                    "example": "API"
233                  },
234                  "userAgent": {
235                    "type": "string"
236                  }
237                }
238              },
239              "stats": {
240                "type": "object",
241                "properties": {
242                  "inputBodyLen": {
243                    "type": "integer",
244                    "example": 2000
245                  },
246                  "rebootCount": {
247                    "type": "integer",
248                    "example": 0
249                  },
250                  "restartCount": {
251                    "type": "integer",
252                    "example": 0
253                  },
254                  "resurrectCount": {
255                    "type": "integer",
256                    "example": 0
257                  },
258                  "computeUnits": {
259                    "type": "integer",
260                    "example": 0
261                  }
262                }
263              },
264              "options": {
265                "type": "object",
266                "properties": {
267                  "build": {
268                    "type": "string",
269                    "example": "latest"
270                  },
271                  "timeoutSecs": {
272                    "type": "integer",
273                    "example": 300
274                  },
275                  "memoryMbytes": {
276                    "type": "integer",
277                    "example": 1024
278                  },
279                  "diskMbytes": {
280                    "type": "integer",
281                    "example": 2048
282                  }
283                }
284              },
285              "buildId": {
286                "type": "string"
287              },
288              "defaultKeyValueStoreId": {
289                "type": "string"
290              },
291              "defaultDatasetId": {
292                "type": "string"
293              },
294              "defaultRequestQueueId": {
295                "type": "string"
296              },
297              "buildNumber": {
298                "type": "string",
299                "example": "1.0.0"
300              },
301              "containerUrl": {
302                "type": "string"
303              },
304              "usage": {
305                "type": "object",
306                "properties": {
307                  "ACTOR_COMPUTE_UNITS": {
308                    "type": "integer",
309                    "example": 0
310                  },
311                  "DATASET_READS": {
312                    "type": "integer",
313                    "example": 0
314                  },
315                  "DATASET_WRITES": {
316                    "type": "integer",
317                    "example": 0
318                  },
319                  "KEY_VALUE_STORE_READS": {
320                    "type": "integer",
321                    "example": 0
322                  },
323                  "KEY_VALUE_STORE_WRITES": {
324                    "type": "integer",
325                    "example": 1
326                  },
327                  "KEY_VALUE_STORE_LISTS": {
328                    "type": "integer",
329                    "example": 0
330                  },
331                  "REQUEST_QUEUE_READS": {
332                    "type": "integer",
333                    "example": 0
334                  },
335                  "REQUEST_QUEUE_WRITES": {
336                    "type": "integer",
337                    "example": 0
338                  },
339                  "DATA_TRANSFER_INTERNAL_GBYTES": {
340                    "type": "integer",
341                    "example": 0
342                  },
343                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
344                    "type": "integer",
345                    "example": 0
346                  },
347                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
348                    "type": "integer",
349                    "example": 0
350                  },
351                  "PROXY_SERPS": {
352                    "type": "integer",
353                    "example": 0
354                  }
355                }
356              },
357              "usageTotalUsd": {
358                "type": "number",
359                "example": 0.00005
360              },
361              "usageUsd": {
362                "type": "object",
363                "properties": {
364                  "ACTOR_COMPUTE_UNITS": {
365                    "type": "integer",
366                    "example": 0
367                  },
368                  "DATASET_READS": {
369                    "type": "integer",
370                    "example": 0
371                  },
372                  "DATASET_WRITES": {
373                    "type": "integer",
374                    "example": 0
375                  },
376                  "KEY_VALUE_STORE_READS": {
377                    "type": "integer",
378                    "example": 0
379                  },
380                  "KEY_VALUE_STORE_WRITES": {
381                    "type": "number",
382                    "example": 0.00005
383                  },
384                  "KEY_VALUE_STORE_LISTS": {
385                    "type": "integer",
386                    "example": 0
387                  },
388                  "REQUEST_QUEUE_READS": {
389                    "type": "integer",
390                    "example": 0
391                  },
392                  "REQUEST_QUEUE_WRITES": {
393                    "type": "integer",
394                    "example": 0
395                  },
396                  "DATA_TRANSFER_INTERNAL_GBYTES": {
397                    "type": "integer",
398                    "example": 0
399                  },
400                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
401                    "type": "integer",
402                    "example": 0
403                  },
404                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
405                    "type": "integer",
406                    "example": 0
407                  },
408                  "PROXY_SERPS": {
409                    "type": "integer",
410                    "example": 0
411                  }
412                }
413              }
414            }
415          }
416        }
417      }
418    }
419  }
420}

OpenAI Vector Store Integration OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for OpenAI Vector Store Integration from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Developer
Maintained by Apify

Actor Metrics

  • 25 monthly users

  • 11 bookmarks

  • 89% runs succeeded

  • 1.5 days response time

  • Created in Apr 2024

  • Modified 5 days ago