#gpt 4
1 messages · Page 1 of 1 (latest)
Hi @orchid ocean. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
The token limit you set is likely part of the parameters in your API call when you use the GPT-4 model. The parameter you're referring to is max_tokens. This parameter is used to set the limit on how many tokens the model will output at one time.
Here's an example of how it might look in your code:
response = openai.Completion.create(
engine="text-davinci-002",
prompt="Translate the following English text to French: '{}'",
max_tokens=250
)
In this example, max_tokens is set to 250. You can change this number to increase or decrease the token limit as needed. Please note that the maximum limit for most models, including GPT-4, is 4096 tokens per output.