UNPKG

@inductiv/node-red-openai-api

Version:

Enhance your Node-RED projects with advanced AI capabilities.

260 lines (221 loc) 9.63 kB
<section> <details> <summary style="font-weight: bold;">📑 Vector Store Files</summary> <a href="https://developers.openai.com/api/reference/typescript/resources/vector_stores/files/" target="_blank">Official Documentation <i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <h4 style="font-weight: bolder;"> ⋙ Create Vector Store File</h4> <p>Create a vector store file by attaching a File to a vector store.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store for which to create a File.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>A File ID that the vector store should use. Useful for tools like file_search that can access files. </dd> <dt class="optional"> attributes <span class="property-type">object</span> </dt> <dd>Optional file attributes stored on the vector store file.</dd> <dt class="optional"> chunking_strategy <span class="property-type">object</span> </dt> <dd>Optional chunking strategy for the attached file.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Create and Poll Vector Store File</h4> <p>SDK helper that creates a vector store file, then polls until processing completes.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store for which to create a File.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>A File ID that the vector store should use.</dd> <dt class="optional"> attributes <span class="property-type">object</span> </dt> <dd>Optional file attributes stored on the vector store file.</dd> <dt class="optional"> chunking_strategy <span class="property-type">object</span> </dt> <dd>Optional chunking strategy for the attached file.</dd> <dt class="optional"> pollIntervalMs <span class="property-type">integer</span> </dt> <dd>Optional polling interval in milliseconds for the helper.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Upload Vector Store File</h4> <p>SDK helper that uploads a local file and then attaches it to a vector store.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that will receive the uploaded file.</dd> <dt> file <span class="property-type">string</span> </dt> <dd>Absolute path to the local file to upload.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Upload and Poll Vector Store File</h4> <p>SDK helper that uploads a local file, attaches it to the vector store, and polls until processing completes.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that will receive the uploaded file.</dd> <dt> file <span class="property-type">string</span> </dt> <dd>Absolute path to the local file to upload.</dd> <dt class="optional"> pollIntervalMs <span class="property-type">integer</span> </dt> <dd>Optional polling interval in milliseconds for the helper.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Poll Vector Store File</h4> <p>SDK helper that waits for a vector store file to finish processing.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that owns the file.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>The ID of the file to poll.</dd> <dt class="optional"> pollIntervalMs <span class="property-type">integer</span> </dt> <dd>Optional polling interval in milliseconds for the helper.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ List Vector Store Files</h4> <p>Returns a list of vector store files.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that the files belong to.</dd> <dt class="optional"> limit <span class="property-type">integer</span> </dt> <dd>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</dd> <dt class="optional"> order <span class="property-type">string</span> </dt> <dd>Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.</dd> <dt class="optional"> before <span class="property-type">string</span> </dt> <dd>A cursor for use in pagination. before is an object ID that defines your place in the list.</dd> <dt class="optional"> after <span class="property-type">string</span> </dt> <dd>A cursor for use in pagination. after is an object ID that defines your place in the list.</dd> <dt class="optional"> filter <span class="property-type">string</span> </dt> <dd>Filter by file status. One of in_progress, completed, failed, cancelled.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Retrieve Vector Store File</h4> <p>Retrieves a vector store file.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that the file belongs to.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>The ID of the file being retrieved.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Modify Vector Store File</h4> <p>Update attributes on a vector store file.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that the file belongs to.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>The ID of the file to update.</dd> <dt> attributes <span class="property-type">object</span> </dt> <dd>Attributes to store on the vector store file. Set to <code>null</code> to clear them.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Get Vector Store File Content</h4> <p>Retrieve the parsed contents of a vector store file.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that owns the file.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>The ID of the file whose parsed content should be returned.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Delete Vector Store File</h4> <p>Remove a file from a vector store.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> vector_store_id <span class="property-type">string</span> </dt> <dd>The ID of the vector store that the file belongs to.</dd> <dt> file_id <span class="property-type">string</span> </dt> <dd>The ID of the file to remove from the vector store.</dd> </dl> </details> </section>