UNPKG

@inductiv/node-red-openai-api

Version:

Enhance your Node-RED projects with advanced AI capabilities.

227 lines (197 loc) 9.09 kB
<section> <details> <summary style="font-weight: bold;">📥 Vector Store File Batches</summary> <a href="https://developers.openai.com/api/reference/typescript/resources/vector_stores/file_batches/" 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 Batch</h4> <p>Create a vector store file batch.</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 Batch.</dd> <dt> file_ids <span class="property-type">array</span> </dt> <dd>A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.</dd> <dt class="optional"> files <span class="property-type">array</span> </dt> <dd>An array of per-file objects that each include <code>file_id</code> plus optional <code>attributes</code> or <code>chunking_strategy</code>.</dd> <dt class="optional"> attributes <span class="property-type">object</span> </dt> <dd>Global attributes to apply to all files when using <code>file_ids</code>.</dd> <dt class="optional"> chunking_strategy <span class="property-type">object</span> </dt> <dd>Global chunking strategy to apply to all files when using <code>file_ids</code>.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Create and Poll Vector Store File Batch</h4> <p>SDK helper that creates a vector store file batch, 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 Batch.</dd> <dt class="optional"> file_ids <span class="property-type">array</span> </dt> <dd>A list of File IDs to attach to the batch.</dd> <dt class="optional"> files <span class="property-type">array</span> </dt> <dd>An array of per-file objects that each include <code>file_id</code> plus optional <code>attributes</code> or <code>chunking_strategy</code>.</dd> <dt class="optional"> attributes <span class="property-type">object</span> </dt> <dd>Global attributes to apply to all files when using <code>file_ids</code>.</dd> <dt class="optional"> chunking_strategy <span class="property-type">object</span> </dt> <dd>Global chunking strategy to apply to all files when using <code>file_ids</code>.</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;"> ⋙ Retrieve Vector Store File Batch</h4> <p>Retrieves a vector store file batch.</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 batch belongs to.</dd> <dt> batch_id <span class="property-type">string</span> </dt> <dd>The ID of the file batch being retrieved.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Poll Vector Store File Batch</h4> <p>SDK helper that waits for a vector store file batch 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 the file batch belongs to.</dd> <dt> batch_id <span class="property-type">string</span> </dt> <dd>The ID of the file batch 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;"> ⋙ Cancel Vector Store File Batch</h4> <p>Cancel a vector store file batch.</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 batch belongs to.</dd> <dt> batch_id <span class="property-type">string</span> </dt> <dd>The ID of the file batch to cancel.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ List Vector Store Batch Files</h4> <p>Returns a list of vector store files in a batch.</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> batch_id <span class="property-type">string</span> </dt> <dd>The ID of the file batch 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"> 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"> 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"> filter <span class="property-type">string</span> </dt> <dd>Filter by file status. One of in_progress, completed, failed, cancelled.</dd> <h4 style="font-weight: bolder;"> ⋙ Upload and Poll Vector Store File Batch</h4> <p>SDK helper that uploads local files concurrently, creates a vector store file batch, 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 to which the files are being uploaded.</dd> <dt> files <span class="property-type">array</span> </dt> <dd>A list of absolute file paths to the files that are being uploaded.</dd> <dt class="optional"> file_ids <span class="property-type">array</span> </dt> <dd>A list of previously uploaded file ids.</dd> <dt class="optional"> pollIntervalMs <span class="property-type">integer</span> </dt> <dd>Optional polling interval in milliseconds for the helper.</dd> <dt class="optional"> maxConcurrency <span class="property-type">integer</span> </dt> <dd>Optional maximum number of concurrent file uploads for the helper.</dd> </dl> </details> </section>