Hi,
I am getting a weird behaviour when consuming the OpenAI completion endpoint. As you can see in the response, the Text field is always empty. When trying this on postman or other service, I get "Text: Customer service". Anyone has a clue why this is happening in Outsystems?
This is my request:
{ "model": "text-davinci-003", "prompt": "Tag the feedback as customer service or user interface\n\nFeedback: My phone is late. Why don't you tell me anything?\n\n", "temperature": 1, "max_tokens": 250, "top_p": 1, "frequency_penalty": 0, "presence_penalty": 0, "stop": ["\n"]}
the response:
{
"id": "cmpl-6UCOwNOkBKu1TdMCz30O2sI12X16v",
"object": "text_completion",
"created": 1672655530,
"model": "text-davinci-003",
"choices": [
"text": "",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 86,
"total_tokens": 86
Just found out that using \n as stopper might trigger inconsistent behavior of the end point.
I am using \n\n instead, and so seems to be working fine.
Hi Carlos,
Checking the documentation you need to send in the request the echo parameter as true
default is false
https://beta.openai.com/docs/api-reference/making-requests
Hope that it helps you