I am trying to integrate ChatGPT with StudioX. I am trying to generate the request payload dynamically by passing a dynamic prompt. Since StudioX does not support variables I am facing hard time to get this done. I am trying to send the following text to body of HTTP Request activity
But I get invalid Json error. If hardcord the value instead of using queryText, I get desired output. When I print the following through a message box, I can see queryText is replaced by the correct query text. What I am doing wrong here?
I tried trough both Wizard and UiPath assistant, but both give me the same result. Is it possible to output the request body from HTTP Request activity?, I see very less debug options as it is StudioX
The response is
{
"error": {
"message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please send an email to support@openai.com and include any relevant code you'd like help with.)",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
I read the prompt text from Word file using Use Word File activity. But the problem is that it automatically appends a new line at the end of the prompt (here Hello). Why is this happening?