Hey everyone,
I’ve been working towards creating an application using Adalo for front end and OpenAI’s Assistant as the backend. The goal is for users to create a new Thread via Adalo, which will generate a Thread ID from OpenAI, and this ID will be stored in Adalo’s database. Each time the user sends a message to the Assistant, the corresponding Thread ID and the message are passed to OpenAI.
OpenAI assures that they will assemble all these messages based on the Thread ID’s for unlimited context and memory. This means that we should be able to hold logical and seamless conversations with the bot, as long as the right IDs are provided - since all computations happen on the OpenAI side.
The problem arises due to the fact that usage of the bot I created using ChatGPT’s builder requires users to have a subscription to Chat GPT Plus ($20 a month) to interact with the bot. This makes it difficult for me to monetize the bot since my users have to pay to use the bot.
Being a non-coder, I’m trying to understand how to send data to OpenAI using custom actions in Adalo and HTTP requests via Make (formerly Integromat). But I keep running into an error. I’m currently trying to get OpenAI to create a thread and pass back the thread id without success.
Here’s what I’ve tried:
- API Endpoint for Thread Creation:
To create a new thread, I was advised to use this endpoint format: https://api.openai.com/v1/assistants/{ASSISTANT_ID}/threads
In this URL, {ASSISTANT_ID} should be replaced with the specific ID of the assistant.
- HTTP POST Request:
In addition to the URL, I added these headers to the request:
{
"Authorization": "Bearer {YOUR_OPENAI_API_KEY}",
"Content-Type": "application/json"
}
The error from MAKE:
I am receiving the following error in response to this request:
{
"error": {
"message": "Invalid URL (POST /v1/assistants/{my_assistant_id}/threads)",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
I understand there must be people in this community who could have tried doing something similar or could have more experience dealing with these tools. Given the error message, it could be that my URL is incorrect, or the way that I am forming the post request is not ideal. I would really appreciate if any of you could help me make some sense out of this error and guide me on how to work through it.
Looking forward to hearing from you. Thank you!