UNPKG

@inductiv/node-red-openai-api

Version:

Enhance your Node-RED projects with advanced AI capabilities.

184 lines (156 loc) 7.09 kB
<section> <details> <summary style="font-weight: bold;">🗃️ Vector Stores</summary> <a href="https://developers.openai.com/api/reference/typescript/resources/vector_stores/" 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</h4> <p>Create a vector store.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt class="optional"> 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"> name <span class="property-type">string</span> </dt> <dd>The name of the vector store.</dd> <dt class="optional"> expires_after <span class="property-type">object</span> </dt> <dd>The expiration policy for a vector store.</dd> <dt class="optional"> chunking_strategy <span class="property-type">object</span> </dt> <dd>The chunking strategy used to chunk the file(s).</dd> <dt class="optional"> metadata <span class="property-type">object</span> </dt> <dd>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ List Vector Stores</h4> <p>Returns a list of vector stores.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <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> </dl> <h4 style="font-weight: bolder;"> ⋙ Retrieve Vector Store</h4> <p>Retrieves 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 to retrieve.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Search Vector Store</h4> <p>Search a vector store for relevant chunks using a query and optional file-attribute filters.</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 search.</dd> <dt> query <span class="property-type">string | array</span> </dt> <dd>A search query string, or an array of query strings.</dd> <dt class="optional"> filters <span class="property-type">object</span> </dt> <dd> File-attribute filters using the SDK's <code>ComparisonFilter</code> or <code>CompoundFilter</code> contract. Comparison filters use <code>key</code>, <code>type</code>, and <code>value</code>. Supported comparison operators include <code>eq</code>, <code>ne</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>, <code>in</code>, and <code>nin</code>. Comparison values may be strings, numbers, booleans, or arrays of strings or numbers. </dd> <dt class="optional"> max_num_results <span class="property-type">integer</span> </dt> <dd>The maximum number of search results to return. Must be between 1 and 50.</dd> <dt class="optional"> ranking_options <span class="property-type">object</span> </dt> <dd>Ranking options for the search request.</dd> <dt class="optional"> rewrite_query <span class="property-type">boolean</span> </dt> <dd>Whether to let the API rewrite the natural-language query before searching.</dd> </dl> <h4 style="font-weight: bolder;"> ⋙ Modify Vector Store</h4> <p>Modifies 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 to modify.</dd> <dt class="optional"> name <span class="property-type">string</span> </dt> <dd>The name of the vector store.</dd> <dt class="optional"> expires_after <span class="property-type">object</span> </dt> <dd>The expiration policy for a vector store.</dd> <dt class="optional"> metadata <span class="property-type">object</span> </dt> <dd>Set of 16 key-value pairs that can be attached to an object.</dd> </dl> <dl> <h4 style="font-weight: bolder;"> ⋙ Delete Vector Store</h4> <p>Delete 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 to delete.</dd> </dl> </details> </section>