ChatGPT Assistant pt2
Additional configurations and functionalities for ChatGPT automation.

Upload File
Upload File is an action type node required to upload a file to GPT chatbot.
Node Configuration
To set up the Upload File node, you must fill in the required fields.
The required* fields include:
- API Key;
- File;
- Purpose.

API Key
The field required for entering the API key (see more details here).
File
The File object (not file name) to be uploaded. The file can be transferred to the node using a Trigger on Webhook node or a file download node, for example from Google Drive.
Purpose
The intended purpose of the uploaded file. Use "fine-tune" for Fine-tuning and "assistants" for Assistants and Messages. This allows us to validate the format of the uploaded file is correct for fine-tuning.
Example of Node Usage
To upload a file to GPT chatbot, you need to add three nodes to the scenario:

- (1) A Trigger on Webhook node with a URL to which a POST request is sent with a Form-data body containing the file Adding a Node;
- (2) A Upload File node to upload a file to GPT chatbot;

- (3) A Webhook Response node to get the ID of the downloaded file.
The result of executing the scenario will be uploading the file to GPT chatbot and receiving the file ID as a response to scenario execution.



Modify Message
Modify Message is an action type node required to change the metadata of a GPT chatbot message sent in the selected thread.
Node Configuration
To configure the Modify Message node, you must fill in the required and optional fields.
The required* fields include:
- Message ID;
- API Key;
- Thread ID.

API Key
The field required for entering the API key (see more details here).
Thread ID
The field required to specify the ID of the thread that contains the message.
Message ID
ID of the message that needs to be changed.
Metadata
The field required to enter additional information about the assistant in the key-value format. The key can contain 64 characters, and the value can contain 512 characters.

Delete File
Delete File an action type node required to delete a previously uploaded file.
Node Configuration
To configure the Delete File node, you must fill in the required fields.
The required* fields include:
- API Key;
- File ID.

API Key
The field required for entering the API key (see more details here).
File ID
ID of the previously uploaded file to delete.
Example of launching a node
It is necessary to launch the Delete File node once with the parameters:
- API Key - Your API key;
- File ID - ID of the previously uploaded file.

The result of node execution is the deletion of the specified file. The output data of the node is the deletion status and the file ID:


Vision
Vision is an action type node is required to send an image and accompanying text to ChatGPT to generate a response regardless of assistants, threads and runs.
Node Configuration
To configure the Vision node, you must fill in the required and optional fields.
The required* fields include:
- API Key.

API Key
The field required for entering the API key (see more details here).
Text
The text of the question on the image or images.
Images
The image is in URLs or base64 encoded string format. See more here.
Detail
By controlling the detail parameter, which has three options, low, high, or auto, you have control over how the model processes the image and generates its textual understanding. By default, the model will use the auto setting which will look at the image input size and decide if it should use the low or high setting.
- low will disable the “high res” model. The model will receive a low-res 512px x 512px version of the image. This allows the to return faster responses and consume fewer input tokens for use cases that do not require high detail.
- high will enable “high res” mode, which first allows the model to see the low res image and then creates detailed crops of input images as 512px squares based on the input image size.
See more here.
Model ID
Drop-down list to select the desired version of the GPT Chatbot model (see more details here). By default, the field is filled with the value gpt-4-vision-preview.
Entity role
The role of the entity that is creating the message. The user value or the assistant value can be selected.
Max tokens
See more here.
Example of launching a node
It is necessary to run the node Vision once with the parameters:
- API Key - Your API key;
- Text - What do the pictures have in common?;
- Images - The image is in base64 encoded string format;
- Detail - low;
- Model ID - gpt-4-vision-preview;
- Entity role - user.
The result of the Vision node execution is to get an answer to the question about the images:


List Assistants
List Assistants is an action type node for getting a filtered list of ChatGPT chat assistants.
Node Configuration
To configure the List Assistants node, you must fill in the required and optional fields.
The required* fields include:
- API Key.

API Key
The field required for entering the API key (see more details here).
Limit
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Order
Drop-down list for selecting the sort order. Two values are available for selection: Ascending order, Descending order. If the parameter is not selected, the values will be sorted in the desc order.
After
A cursor for use in pagination. Object ID (Assistant ID) that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Before
A cursor for use in pagination. Object ID (Assistant ID) that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
Example of launching a node
It is necessary to run the node List Assistants once with the parameters:
- API Key - Your API key;
- Limit - 10;
- Order - Ascending order;

The result of the List Assistants node execution is a list of assistants, including attributes for each assistant:
- created_at,
- description,
- file_ids,
- id,
- instructions,
- metadata,
- model,
- name,
- object: assistant,
- tools.

List Files
List Files is an action type node for getting a list of ChatGPT files filtered by purpose.
Node Configuration
To configure the List Files node, you must fill in the required and optional fields.
The required* fields include:
- API Key.

API Key
The field required for entering the API key (see more details here).
Purpose
Drop-down list for selecting the purpose for which files are needed. Two values are available for selection: assistants, fine-tune. If no value is selected, the result will contain all files.
Example of launching a node
It is necessary to run the node List Files once with the parameters:
- API Key - Your API key;
- Purpose - assistants.

The result of the List Files node execution is a list of files, including attributes for each file:
- bytes;
- created_at,
- filename,
- id,
- object: file,
- purpose: assistants or fine-tune;
- status;
- status_details.

List Messages
List Messages is an action type node for getting a filtered list of ChatGPT chat messages according to thread.
Node Configuration
To configure the List Messages node, you must fill in the required and optional fields.
The required* fields include:
- API Key;
- Thread ID.

API Key
The field required for entering the API key (see more details here).
Thread ID
The field required to specify the ID of the thread to messages should be received.
Limit
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Order
Drop-down list for selecting the sort order. Two values are available for selection: Ascending order, Descending order. If the parameter is not selected, the values will be sorted in the desc order.
After
A cursor for use in pagination. Object ID (Message ID) that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Before
A cursor for use in pagination. Object ID (Message ID) that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
Example of launching a node
It is necessary to run the node List Messages once with the parameters:
- API Key - Your API key;
- Thread ID - Your Thread ID;
- Limit - 2;
- Order - Ascending order.

The result of the List Messages node execution is a list of messages, including attributes for each message:
- assistant_id,
- content,
- created_at,
- file_ids,
- id,
- metadata,
- object: thread.message,
- role: user or assistant,
- run_id,
- thread_id.

List Runs
List Runs is an action type node for getting a filtered list of ChatGPT chat runs according to thread.
Node Configuration
To configure the List Runs node, you must fill in the required and optional fields.
The required* fields include:
- API Key;
- Thread ID.

API Key
The field required for entering the API key (see more details here).
Thread ID
The field required to specify the ID of the thread to runs should be received.
Limit
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Order
Drop-down list for selecting the sort order. Two values are available for selection: Ascending order, Descending order. If the parameter is not selected, the values will be sorted in the desc order.
After
A cursor for use in pagination. Object ID (Run ID) that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Before
A cursor for use in pagination. Object ID (Run ID) that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
Example of launching a node
It is necessary to run the node List Runs once with the parameters:
- API Key - Your API key;
- Thread ID - Your Thread ID;
- Limit - 5;
- Order - Descending order.

- assistant_id,
- cancelled_at,
- completed_at,
- created_at,
- expires_at,
- failed_at,
- file_ids,
- id,
- instructions,
- last_error,
- metadata,
- model,
- object: thread.run,
- started_at,
- status,
- thread_id,
- tools,
- usage.

Retrieve Assistant
Retrieve Assistant is an action type node for getting information about a given assistant by its ID.
Node Configuration
To configure the Retrieve Assistant node, you must fill in the required fields.
The required* fields include:
- API Key;
- Assistant ID.

API Key
The field required for entering the API key (see more details here).
Assistant ID
The field for entering the identifier of the assistant for which information is to be obtained.
Example of launching a node
It is necessary to run the node Retrieve Assistant once with the parameters:
- API Key - Your API key;
- Assistant ID - Your Assistant ID.

The result of the Retrieve Assistant node execution is information about the requested assistant, including:
- created_at,
- description,
- file_ids,
- id,
- instructions,
- metadata,
- model,
- name,
- object: assistant,
- tools.

Retrieve Message
Retrieve Message is an action type node for getting information about a given message by its ID and thread ID.
Node Configuration
To configure the Retrieve Message node, you must fill in the required fields.
The required* fields include:
- API Key;
- Thread ID;
- Message ID.

API Key
The field required for entering the API key (see more details here).
Thread ID
A field for entering the ID of the thread to which the message belongs.
Message ID
The field for entering the identifier of the message for which information is to be obtained.
Example of launching a node
It is necessary to run the node Retrieve Message once with the parameters:
- API Key - Your API key;
- Thread ID - Your Thread ID;
- Message ID - Your Message ID.

The result of the Retrieve Message node execution is information about the requested message, including:
- assistant_id,
- content,
- created_at,
- file_ids,
- id,
- metadata,
- object: thread.message,
- role: user or assistant,
- run_id,
- thread_id.

Retrieve Run
Retrieve Run is an action type node for getting information about a given run by its ID and thread ID.
Node Configuration
To configure the Retrieve Run node, you must fill in the required fields.
The required* fields include:
- API Key;
- Thread ID;
- Run ID.

API Key
The field required for entering the API key (see more details here).
Thread ID
A field for entering the ID of the thread to which the run belongs.
Run ID
The field for entering the identifier of the run for which information is to be obtained.
Example of launching a node
It is necessary to run the node Retrieve Run once with the parameters:
- API Key - Your API key;
- Thread ID - Your Thread ID;
- Run ID - Your Run ID.

The result of the Retrieve Run node execution is information about the requested run, including:
- assistant_id,
- cancelled_at,
- completed_at,
- created_at,
- expires_at,
- failed_at,
- file_ids,
- id,
- instructions,
- last_error,
- metadata,
- model,
- object: thread.run,
- started_at,
- status,
- thread_id,
- tools,
- usage.

Retrieve Thread
Retrieve Thread is an action type node for getting information about a given thread by its ID.
Node Configuration
To configure the Retrieve Thread node, you must fill in the required fields.
The required* fields include:
- API Key;
- Thread ID.

API Key
The field required for entering the API key (see more details here).
Thread ID
The field for entering the identifier of the thread for which information is to be obtained.
Example of launching a node
It is necessary to run the node Retrieve Thread once with the parameters:
- API Key - Your API key;
- Thread ID - Your Thread ID.

The result of the Retrieve Thread node execution is information about the requested thread, including:
- created_at,
- id,
- metadata,
- object: thread.

Vision
Vision is an action type node is required to send an image and accompanying text to ChatGPT to generate a response regardless of assistants, threads and runs.
Node Configuration
To configure the Vision node, you must fill in the required and optional fields.
The required* fields include:
- API Key.

API Key
The field required for entering the API key (see more details here).
Text
The text of the question on the image or images.
Images
The image is in URLs or base64 encoded string format. See more here.
Detail
By controlling the detail parameter, which has three options, low, high, or auto, you have control over how the model processes the image and generates its textual understanding. By default, the model will use the auto setting which will look at the image input size and decide if it should use the low or high setting.
- low will disable the “high res” model. The model will receive a low-res 512px x 512px version of the image. This allows the to return faster responses and consume fewer input tokens for use cases that do not require high detail.
- high will enable “high res” mode, which first allows the model to see the low res image and then creates detailed crops of input images as 512px squares based on the input image size.
See more here.
Model ID
Drop-down list to select the desired version of the GPT Chatbot model (see more details here). By default, the field is filled with the value gpt-4-vision-preview.
Entity role
The role of the entity that is creating the message. The user value or the assistant value can be selected.
Max tokens
See more here.
Example of launching a node
It is necessary to run the node Vision once with the parameters:
- API Key - Your API key;
- Text - What do the pictures have in common?;
- Images - The image is in base64 encoded string format;
- Detail - low;
- Model ID - gpt-4-vision-preview;
- Entity role - user.
The result of the Vision node execution is to get an answer to the question about the images:
