#gpt 4

1 messages · Page 1 of 1 (latest)

orchid ocean
#

I need help with something. I remember I put the limit of tokens to 250. How can I change that? I forgot where to change it

fading hedgeBOT
#

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.

For more information, you can refer to the OpenAI documentation (https://platform.openai.com/docs/guides/fine-tuning/token-limits) or the OpenAI community forum (https://community.openai.com/t/601330).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: