UNPKG

@inductiv/node-red-openai-api

Version:

Enhance your Node-RED projects with advanced AI capabilities.

88 lines (78 loc) โ€ข 4.14 kB
<section> <details> <summary style="font-weight: bold;">๐Ÿงต Threads</summary> <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank">Official Documentation <i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <h4 style="font-weight: bolder;"> โ‹™ Create Thread</h4> <p>Create a thread.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt class="optional"> messages <a href="https://platform.openai.com/docs/api-reference/threads/createThread#threads-createthread-messages" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">array</span> </dt> <dd>A list of messages to start the thread with.</dd> <dt class="optional"> tool_resources <a href="https://platform.openai.com/docs/api-reference/threads/createThread#threads-createthread-tool_resources" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">array</span> </dt> <dd>A set of resources that are made available to the assistant's tools in this thread.</dd> <dt class="optional"> metadata <a href="https://platform.openai.com/docs/api-reference/threads/createThread#threads-createthread-metadata" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">object</span> </dt> <dd>Set of 16 key-value pairs that can be attached to an object.</dd> </dl> <h4 style="font-weight: bolder;"> โ‹™ Retrieve Thread</h4> <p>Retrieves a thread.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> thread_id <a href="https://platform.openai.com/docs/api-reference/threads/getThread#threads-getthread-thread_id" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">string</span> </dt> <dd>The ID of the thread to retrieve.</dd> </dl> <h4 style="font-weight: bolder;"> โ‹™ Modify Thread</h4> <p>Modifies a thread.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> thread_id <a href="https://platform.openai.com/docs/api-reference/threads/modifyThread#threads-modifythread-thread_id" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">string</span> </dt> <dd> The ID of the thread to modify. Only the metadata can be modified. </dd> <dt class="optional"> metadata <a href="https://platform.openai.com/docs/api-reference/threads/modifyThread#threads-modifythread-metadata" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">object</span> </dt> <dd>Set of 16 key-value pairs that can be attached to an object.</dd> </dl> <h4 style="font-weight: bolder;"> โ‹™ Delete Thread</h4> <p>Delete a thread.</p> <dl class="message-properties"> <h4>msg.payload Properties</h4> <dt> thread_id <a href="https://platform.openai.com/docs/api-reference/threads/deleteThread#threads-deletethread-thread_id" target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a> <span class="property-type">string</span> </dt> <dd>The ID of the thread to delete.</dd> </dl> </details> </section>