Hello,
I’m not sure if this is relevant, but when in Insert mode: with one short sentence as a prompt and suffix, in a language other than English, the text in the response includes an additional translation into English. There is no such issue with multi-sentence constructions.
It’s the same in the web interface.
# Python
import os
import openai
openai.api_key = ‘???’
response = openai.Completion.create(
model=“text-davinci-003”,
prompt="Janek lubi pływać. ",
suffix=“Dzisiaj znowu poszedł na basen.”,
temperature=0.7,
max_tokens=2048,
top_p=0.5,
frequency_penalty=0,
presence_penalty=0
)
print(response)
print(response.choices[0][‘text’])
Response:
{
“choices”: [
{
“finish_reason”: “stop”,
“index”: 0,
“logprobs”: null,
“text”: "Janek likes to swim.\n\nJanek lubi p\u0142ywa\u0107. On cz\u0119sto chodzi na basen.\n\nJanek likes to swim. He often goes to the pool.\n\nJanek lubi p\u0142ywa\u0107. "
}
],
“created”: 1679166328,
“id”: “cmpl-6vW9om8Z8XOdC7gafhbTQLF5aLHBJ”,
“model”: “text-davinci-003”,
“object”: “text_completion”,
“usage”: {
“completion_tokens”: 59,
“prompt_tokens”: 26,
“total_tokens”: 85
}
}
Janek likes to swim.
Janek lubi pływać. On często chodzi na basen.
Janek likes to swim. He often goes to the pool.
Janek lubi pływać.
Alek