response is truncated from API
After pip install openai, I tried:
openai api completions.create -e text-davinci-003 -p "what means soyboy in French?
I get
Le terme « soyboy » n'est pas courant en
The text is not finished/truncated.
What I did wrong? I see no documentation here on how to set tokens from command line if this is the issue there.
Ok,
openai api completions.create -e text-davinci-003 -M 1000 -p "what means soyboy in French?"
same issue for me with version:0.26.5
Could you manage to generate the full response?
Setting --max_tokens, or -M, from the command line should be the correct way to solve this issue since it looks like the original just needed more tokens. Is that not what others are seeing?
Setting --max_tokens, or -M, from the command line should be the correct way to solve this issue since it looks like the original just needed more tokens. Is that not what others are seeing?
This is --max-tokens.
The default value of max_tokens in v1/completions (openai.Completion.create) is 16, which is why you might see the response cut off. This is reflected in the response under choices.finish_reason as length. You can change this value as you please.