To test the action on the deployed CAP API endpoint you can e.g. use the API Platform Postman.
- Create new POST request
- Enter the request URL
<BASEURL>/ai/aiProxy
- Add the authorization details of your UAA instance for the type OAuth 2.0
- Specify a prompt as JSON payload in the Body, e.g.:
{
"prompt": "Please tell me a joke about SAP technology!"
}
- Send the request and inspect the response with the generated text:
What did the SAP consultant say when asked to solve a problem? Answer: "Let me just SAP it up!"
{
"@odata.context": "$metadata#AIService.GPTTextResponse",
"text": "\n\nQ: What did the SAP consultant say when asked to solve a problem?\nA: \"Let me just SAP it up!\""
}