Hi,
I have a GET Webhook that retrieves all the messages from a conversation previously created using an LLM app (CustomGPT)
The data received as the following structure:
data
Conversation
Conv ID
Conv Created at
…..
Messages
Current page
data
1
xxxx
AI Response
2
yyyyy
AI response
I want to retrieve the AI response of the last message in the conversation.
I have tried to use a Code step with Python to process the output of the GET.
The output of the GET has a field that contains all the responses in the following format:
responses_list = AI_response1, AI_response 2, AI_response3, etc.
I have tried to split it with:
output = input_datat"responses_list"].split(",")
Since each response may contain commas, I cannot isolate the responses but only phrases between commas.
I have tried to get a JSON key output by selecting the option in the GET step, but I was not able to find a way to access that JSON output from the Code step.
Any suggestion on how to address this issue?
Thanks!