Skip to main content

04.6.2.02 Create Run

Node Description

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.

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.

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: