Hei Bubblers, I still working with Open AI and trying to create an Assistant. And I dont understand the logic of giving a response and retrieve an information from the response. I would really appreciate if you help me with that.
Task overall: To create a system of generating OpenAI messages depends on users input and save it into a database in order to reuse responses later.
My issues/current task:
I am getting a response (JSON from Open AI) but when I am trying to save the response to a variable somehow I am getting an information not from the latest item but from 3rd item in JSON.
What I am doing and how:
Step 1: I set a connection with Open AI through API connector. You can check a screen with a response in the attachment.
Step 2: My workflow and Interface. I have few elements.
A. Input Element - A user can upload text
B. Text element - Displays of Open AI response
C. Button Element - When user click β Launch Workflow:
Step 1: Create POST request to send users message
Step 2: Run a Run. (put message into a thread)
Step 3: Make a pause (I added that step just to be sure that Open AI created a response)
Step 4: (Issue step) Create a custom state with latest item id. (screen attached) β Get external data AND ID.
But, what I need is to get ID from the latest message in a thread. Instead it is taken from third message. I tried different combinations such as:
- Get data from ext. api β data β Last item β id
- Get data from ext. api β data β Last item β item Number
I assume that JSON is request to give an id and JSON requested to POST a message somehow working asynchronically or request are sent asynchronically.
I dont understand how it works in bubble.
Anyone can help me with that?