Go to the AI Hub section of your personal account.
Click the Create assistant button or
in the upper left corner.
Specify the name and description of the assistant — they are needed for identification in the list.
Select a model. Currently, only ChatGPT models from OpenAI are available.
Specify the provider — currently, only OpenAI is supported.
Set the response temperature (from 0 to 2), where:
To delete an unnecessary assistant, follow these steps:
It is not possible to restore an assistant after deletion, only to create a new one.
Create a new thread and get its ID. This will allow you to chat with the assistant within a single thread. To do this, use the following code:
$threadId = gpt.createThread()
Place this code block at the beginning of the script in the Expression block, no later than the first Question block, to write the thread ID to the threadId variable.
Use the following code to send a question and receive a response from the assistant:
$answer = gpt.assist($assistId, $threadId, $question, “gpt-4o”, “You are a virtual assistant.”, “Your name is Ivan.”, 0.5, 500, 10)
Parameters:
assistId — assistant ID.Assistant ID can be copied by using the ID button in the Provider column.
threadId — thread ID.question — your question to the assistant.“gpt-4o” — ChatGPT model. Specify a specific model or leave the string empty to use the default model.“You are a virtual assistant.” — the assistant's main instruction. Set the instruction to guide the assistant's responses.“Your name is Ivan.” — additional assistant instruction. You can set additional contexts for the assistant.0.5 — response temperature (from 0 to 1), which determines the reliability and variability of responses.500 — maximum number of tokens in a response. Be careful not to exceed the limit.10 — response timeout in seconds. The maximum value is 30 seconds.If you no longer need the current thread, delete it to clear the dialogue history and free up resources. Use the following code:
gpt.deleteThread($threadId)