@inductiv/node-red-openai-api
Version:
Enhance your Node-RED projects with advanced AI capabilities.
154 lines (140 loc) • 5.54 kB
HTML
<section>
<details>
<summary style="font-weight: bold;">📟 Messages</summary>
<a href="https://developers.openai.com/api/reference/typescript/resources/beta/threads/messages/" target="_blank">Official Documentation
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
<h4 style="font-weight: bolder;"> ⋙ List Messages</h4>
<p>Returns a list of messages for a given thread.</p>
<dl class="message-properties">
<h4>msg.payload Properties</h4>
<dt>
thread_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread the messages 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.</dd>
<dt class="optional">
after
<span class="property-type">string</span>
</dt>
<dd>A cursor for use in pagination.</dd>
<dt class="optional">
before
<span class="property-type">string</span>
</dt>
<dd>A cursor for use in pagination.</dd>
<dt class="optional">
run_id
<span class="property-type">string</span>
</dt>
<dd>Filter messages by the run ID that generated them.</dd>
</dl>
<h4 style="font-weight: bolder;"> ⋙ Create Message</h4>
<p>Create a message.</p>
<dl class="message-properties">
<h4>msg.payload Properties</h4>
<dt>
thread_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread to create a message for.</dd>
<dt>
role
<span class="property-type">string</span>
</dt>
<dd>The role of the entity that is creating the message.</dd>
<dt>
content
<span class="property-type">string</span>
</dt>
<dd>The content of the message.</dd>
<dt class="optional">
attachments
<span class="property-type">array</span>
</dt>
<dd>A list of files attached to the message, and the tools they should be added to.</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>
<h4 style="font-weight: bolder;"> ⋙ Delete Message</h4>
<p>Deletes a message.</p>
<dl class="message-properties">
<h4>msg.payload Properties</h4>
<dt>
thread_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread to which this message belongs.</dd>
<dt>
message_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the message to delete.</dd>
</dl>
<h4 style="font-weight: bolder;"> ⋙ Retrieve Message</h4>
<p>Retrieve a message.</p>
<dl class="message-properties">
<h4>msg.payload Properties</h4>
<dt>
thread_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread to which this message belongs.</dd>
<dt>
message_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the message to retrieve.</dd>
</dl>
<h4 style="font-weight: bolder;"> ⋙ Delete Message</h4>
<p>Delete a message.</p>
<dl class="message-properties">
<h4>msg.payload Properties</h4>
<dt>
thread_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread to which this message belongs.</dd>
<dt>
message_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread to which this message belongs.</dd>
</dl>
<h4 style="font-weight: bolder;"> ⋙ Modify Message</h4>
<p>Modifies a message.</p>
<dl class="message-properties">
<h4>msg.payload Properties</h4>
<dt>
thread_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the thread to which this message belongs.</dd>
<dt>
message_id
<span class="property-type">string</span>
</dt>
<dd>The ID of the message to modify.</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>
</details>
</section>