tech2
(Tech)
October 10, 2023, 11:39am
1
Hi there. I’m trying the openai plugin. I have the following workflow:
But when displaying the messagebox it says:
The variables i declared:
I just want to use the converted text to write to a new document but with the message box i want to see before converting if the response from GPT is correct. For example I entered a prompt ‘translate to French’.
Hi @tech2
Use for each loop to see items in the collection variables like arrays or list and then use message box to access the elements with currentitem.
or use index ResponseList(0),ResponseList(1)…etc
Hope it helps!!
@tech2
in the message box you need to type as
ResponseList(0) like that or ResponseList(index)
cheers
Hi @tech2 ,
Maybe you could check in the Debug Panel like an example shown here :
Hi @ydhanabalan ,
We would recommend to check the Output representation in the Immediate Panel and get the required key to access the value. A Demo/implementation is shown below :
[image]
Debug Panel :
[image]
Expression to be used :
responseListOutput.Where(Function(x)x.ContainsKey("answer")).First.item("answer")
Assuming key “answer” would always be present in the output.
Also note that AskGPT is going to be deprecated soon :
https://forum.uipath.com/t/ask-gpt-activity-in-marketplac…
@tech2 ,
Could you check the post that I have highlighted ? It used Debug Panel with checks and visibility on the Data formats.
Anil_G
(Anil Gorthi)
October 10, 2023, 1:58pm
7
@tech2
As per screenshot you provided looks like you directly are trying the whole variable
outputvar(0)("answer").ToString
cheers