Iam here to ask you guys for help. Iam lernig to use API GPT-4 and here comes my question. How can I create longer content than 400 words with it? Even when Iam setting Maximum length as its max (2048) it creates content no longer than 426 words. Is there any way to make it longer
Maximum length helps the model choose what is the max number of tokens it has to generate rather than the max number of words. For a rule of thumb, Open AI docs suggest that 100 tokens ~= 75 words.
For your specific problem, you can always prompt it to generate the ouput of a certain length (Instruction - Ensure that the output generated is more than four hundred words) or something along these lines. The instruction can vary problem to problem so you’ll have to test and see which works best for you.
Tokeniser reference : OpenAI Platform
There’s a kind of bug where it doesn’t want to generate more than a certain number of words, despite how many you ask it to. You’ll have to split a prompt into parts. Here’s an example of how to do that: https://chat.openai.com/share/e88d8223-376e-45c9-94c2-c0ebd4b9c198
Hey there, I have set the maximum length to 7k tokens, yet the responses are always much shorter. It is some kind of error that I can report something or idk?
Maximum length means the API will stop generation tokens when that limit reached. Setting max tokens to 7k means that when the conversation reaches 7k tokens it will stop and throw an error everytime you try to generate more content.
To generate 7k tokens specify to the model that you want a high amount of words, like 15,000.