ChatGPT Assistant

Integrating ChatGPT for AI-powered automation.

Notion image

Create Assistant

Create Assistant - an action type node required to create a GPT Chatbot assistant.

Node Configuration

To configure the Create Assistant node, you must fill in the required and optional fields.

Required* fields include:

  • API Key;
  • Model ID.
Notion image

API Key

The field required for entering the API key (see more details 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-3.5-turbo.

File IDs list

A field for entering file IDs that the assistant can use, for example, to write code, if these features are enabled.

The following format for entering file IDs is used:["file-abc123","file-abc456"].

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.

Assistant name

A field for entering the name of the assistant. The name can contain up to 256 characters.

Description

A field for entering a description of the assistant. The description can contain up to 512 characters.

System instructions

A field for entering instructions for the assistant.

Tools

Fields for configuring the assistant with the option to select true/false:

  • Code interpreter(Tools) - The setting allows the assistant to write and run Python code in an isolated runtime environment. This tool can process files with a variety of data and formatting, as well as create files with data and graph images. The code Interpreter allows your Assistant to iteratively run code to solve complex code and mathematical problems. For more information, see here.
  • Retrieval(Tools) - Extraction complements the assistant with knowledge beyond its model, such as private product information or documents provided by your users. After the file is uploaded and transferred to the assistant, the documents are automatically divided into parts, indexed and attachments are saved. For more information, see here.

Function(Tools)

A field for entering a function that the assistant can use. Assistants API supports function calling. Function calling allows you to describe functions to the Assistants and have it intelligently return the functions that need to be called along with their arguments. The Assistants API will pause execution during a Run when it invokes functions, and you can supply the results of the function call back to continue the Run execution.

For more information, see here.

The following function input format is used: [{"type": "function", "function": {"name": "function_name","parameters": {},"description": "function_description"}]

Example of launching a node

It is necessary to run the Create Assistant node once with the parameters:

  • API Key - Your API key;
  • Model ID - gpt-3.5-turbo;
  • Assistant name - Latenode platform assistant;
  • Description - An assistant answering questions about the user's work on the Latenode platform, for example, about creating scenarios, nodes, routes.
Notion image

The result of the node execution is the creation of an assistant named assistant Latenode platform assistant. The output data of the node Create Assistant are the parameters of the assistant:

Notion image

Notion image

Create Run

Create Run an action type node required to create a run for which the assistant will start processing messages.

Node Configuration

To configure the Create Run node, you must fill in the required and optional fields.

The required* fields include:

  • API Key;
  • Thread ID;
  • Assistant ID.
Notion image

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 in which the message processing should be started.

Assistant ID

The field required to specify the ID of the assistant that will process the thread messages after run.

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.

System instructions

A field for entering instructions for run.

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 gpt-4 value.

Tools

Fields for configuring the assistant with the option to select true/false:

  • Code interpreter(Tools) - The setting allows the assistant to write and run Python code in an isolated runtime environment. This tool can process files with a variety of data and formatting, as well as create files with data and graph images. The code Interpreter allows your Assistant to iteratively run code to solve complex code and mathematical problems. For more information, see here.
  • Retrieval(Tools) - Extraction complements the assistant with knowledge beyond its model, such as private product information or documents provided by your users. After the file is uploaded and transferred to the assistant, the documents are automatically divided into parts, indexed and attachments are saved. For more information, see here.

Function(Tools)

A field for entering a function that the assistant can use. Assistants API supports function calling. Function calling allows you to describe functions to the Assistants and have it intelligently return the functions that need to be called along with their arguments. The Assistants API will pause execution during a Run when it invokes functions, and you can supply the results of the function call back to continue the Run execution.

For more information, see here.

The following function input format is used: [{"type": "function", "function": {"name": "function_name","parameters": {},"description": "function_description"}]

Example of launching a node

It is necessary to run the node Create Run once with the parameters:

  • API Key - Your API key;
  • Thread ID - ID of an existing platform thread;
  • Assistant ID - ID of an existing platform assistant.
Notion image

The result of node execution is the creation of a run for processing and receiving a response to a message from a specified thread by a specified assistant:

Notion image

Notion image

Delete Thread

Delete Thread an action type node required to delete a previously created thread.

Node Configuration

To configure the Delete Thread node, you must fill in the required fields.

The required* fields include:

  • API Key;
  • Thread ID.
Notion image

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 be deleted.

Example of launching a node

It is necessary to run the Delete Thread node once with the parameters:

  • API Key - Your API key;
  • Thread ID - ID of the previously created thread.
Notion image

The result of node execution is the deletion of a previously created thread. The output data of the Delete Thread node is the deletion status and the thread ID:

Notion image

Notion image

Send Message

Send Message - an action type node required to send a GPT Chatbot message and receive a response, regardless of assistants, threads, and runs. When sending a message, you can select the GPT Chatbot version.

Node Configuration

To configure the Send Message node, you must fill in the required and optional fields.

Required* fields include:

  • Message;
  • API Key.
Notion image

Message

The field required for entering the text of the message to the GPT chatbot.

💡
In the Message field, you can enter text, variables from other nodes, or parameters from responses of other nodes.

API Key

The field required for entering the API key (see more details here).

GPT Version

A field for selecting the desired version of the GPT chatbot model (see more details here). By default, the field is filled with the value gpt-3.5-turbo.

Example of Node Usage

To receive a response from the GPT chatbot, you need to create a scenario with nodes:

Notion image

1. Trigger on Webhook node is used to trigger the scenario and pass a text question, for example, What is the most popular programming language?;

Notion image

2. Send Message node is used to send the question to the GPT chatbot;

Notion image

3. Webhook response for receiving a response to a message.

Notion image

The result of executing this scenario is the response from the GPT chatbot, for example:

As of 2021, the most popular programming language is JavaScript. It is widely used for web development and is supported by all major web browsers. Other popular programming languages include Python, Java, C++, and C#. The popularity of programming languages can vary depending on the specific domain or industry.

Notion image

Notion image

Create Message

Create Message - an action type node required to send a GPT chatbot message using a given thread.

Node Configuration

To configure the Create Message node, you must fill in the required and optional fields.

Required* fields include:

  • Message content;
  • API Key;
  • Thread ID.
Notion image

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 which the message should be sent.

Message content

The text field required to enter the message.

File IDs list

A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message.

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.

Entity role

The role of the entity that is creating the message. Currently only user is supported.

Example of launching a node

It is necessary to run the Create Message node once with the parameters:

  • API Key - Your API key;
  • Thread ID - id of the previously created thread;
  • Message content - How do I add a node to the scenario?;
  • Entity role - User.
Notion image

The result of the node execution is the creation of a message with the specified text. The output of the Create Message node is the message parameters.

Notion image

 
Notion image

Create Thread

Create Thread - an action type node required to create a thread.

Node Configuration

To configure the Create Thread node, you must fill in the required and optional fields.

Required* fields include:

  • API Key.
Notion image

API Key

The field required for entering the API key (see more details here).

New message

A field with the option to select true/false. If true is checked, a message will be sent in the Message content field when creating a thread. If false is checked, the thread will be created empty.

Message content

The text field required to enter the message.

File IDs list

A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message.

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.

Entity role

The role of the entity that is creating the message. Currently only user is supported.

Example of launching a node

It is necessary to run the Create Thread node once with the parameters:

  • API Key - Your API key;
  • New message - true;
  • Message content - Welcome to the Latenode platform! I am waiting for your questions;
  • Entity role - User.
Notion image

The result of node execution is the creation of a thread with the specified message (if such a setting has been made). The output data of the Create Thread node are the parameters of the thread.

Notion image

Notion image

GPT 3.5 turbo instruct

GPT 3.5 turbo instruct - an action type node required to send a GPT Chatbot message of the gpt-3.5-turbo-instruct version and receive a response regardless of assistants, threads and runs. When sending a message, the choice of the GPT Chatbot version is NOT available.

Node Configuration

To configure the GPT 3.5 turbo instruct node, you must fill in the required and optional fields.

Required* fields include:

  • Message;
  • API Key.
Notion image

Message

The field required for entering the text of the message to the GPT Chatbot.

💡
In the Message field, you can enter text, variables from other nodes, or parameters from responses of other nodes.

API Key

The field required for entering the API key (see more details here).

Example of launching a node

It is necessary to run the GPT 3.5 turbo instruct node once with the parameters:

  • API Key - Your API key;
  • Message - What is the most popular programming language?.
Notion image

The result of node execution is the formation of a response to a given message. The output data of the GPT 3.5 turbo instruct node are message parameters, including text.

Notion image

Notion image

Delete Assistant

Delete Assistant an action type node required to delete a previously created assistant.

Node Configuration

To configure the Delete Assistant node, you must fill in the required fields.

The required* fields include:

  • API Key;
  • Assistant ID.
Notion image

API Key

The field required for entering the API key (see more details here).

Assistant ID

The field required to specify the ID of the assistant to be deleted.

Example of launching a node

It is necessary to launch the Delete Assistant node once with the parameters:

  • API Key - Your API key;
  • Assistant ID - the ID of the previously created assistant.
Notion image

The result of the node execution is the deletion of the previously created assistant. The output data of the Delete Assistant node is the delete status and the assistant ID.

Notion image

Notion image

Download File

Download File - an action type node required for downloading chatbot files uploaded to GPT.

Node Configuration

To set up the Download File node, you must fill in the required fields.

Required* fields include:

  • API Key;
  • File ID.
Notion image

API Key

The field required for entering the API key (see more details here).

File ID

ID of the previously uploaded file that needs to be downloaded.

Example of launching a node

It is necessary to launch the Download File node once with the parameters:

  • API Key - Your API key;
  • File ID - ID of the previously uploaded file.
Notion image

The result of node execution is file download. The output data of the Download File node is the file parameters, including the content.

Notion image

Notion image

Modify Assistant

Modify Assistant - an action type node required to modify an already created GPT Chatbot assistant.

Node Configuration

To configure the Modify Assistant node, you must fill in the required and optional fields.

Required* fields include:

  • API Key;
  • Assistant ID.
Notion image

API Key

The field required for entering the API key (see more details here).

Assistant ID

A field for entering the ID of the assistant whose parameters need to be replaced.

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-3.5-turbo.

File IDs list

A field for entering file IDs that the assistant can use, for example, to write code, if these features are enabled.

The following format for entering file IDs is used:

["file-abc123","file-abc456"].

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.

Assistant name

A field for entering the name of the assistant. The name can contain up to 256 characters.

Description

A field for entering a description of the assistant. The description can contain up to 512 characters.

System instructions

A field for entering instructions for the assistant.

Tools

Fields for configuring the assistant with the option to select true/false:

  • Code interpreter(Tools) - The setting allows the assistant to write and run Python code in an isolated runtime environment. This tool can process files with a variety of data and formatting, as well as create files with data and graph images. The code Interpreter allows your Assistant to iteratively run code to solve complex code and mathematical problems. For more information, see here.
  • Retrieval(Tools) - Extraction complements the assistant with knowledge beyond its model, such as private product information or documents provided by your users. After the file is uploaded and transferred to the assistant, the documents are automatically divided into parts, indexed and attachments are saved. For more information, see here.

Function(Tools)

A field for entering a function that the assistant can use. Assistants API supports function calling. Function calling allows you to describe functions to the Assistants and have it intelligently return the functions that need to be called along with their arguments. The Assistants API will pause execution during a Run when it invokes functions, and you can supply the results of the function call back to continue the Run execution.

For more information, see here.

The following function input format is used: [{"type": "function", "function": {"name": "function_name","parameters": {},"description": "function_description"}]

Example of launching a node

It is necessary to run the Modify Assistant node once with the parameters:

  • API Key - Your API key;
  • Assistant ID - ID of the previously created assistant;
  • Model ID - gpt-3.5-turbo;
  • Assistant name - Latenode platform assistant version 2.
Notion image

The result of the node execution is the change of the previously created assistant, including its name to Latenode platform assistant version 2. The output data of the Modify Assistant node are the assistant parameters:

Notion image

Modify Run

Modify Run is an action type node required to change the run metadata in the selected GPT chatbot thread.

Node Configuration

To configure the Modify Run node, you must fill in the required and optional fields.

The required* fields include:

  • Run ID;
  • API Key;
  • Thread ID.
Notion image

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 in which the run needs to be changed.

Run ID

ID of the run whose metadata 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.

Did this answer your question?
😞
😐
🤩