Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About setting the " /tokens [n] Set/Display tokens to use." parameter #1

Open
marioseixas opened this issue Mar 10, 2023 · 1 comment

Comments

@marioseixas
Copy link

It is possible to not set this parameter so it could default to Inf, Inf meaning (4096 - prompt tokens)? That way no one needs to keep making calculations about how many tokens to use or to make available:

223791241-59e3178d-7ca6-43e4-b4ca-ec700852148d

@GaryDean
Copy link
Collaborator

Set max_tokens=-1 (/tokens -1) for maximum allowable response tokens.

When /tokens is -1, max_tokens is calculated thus:

token_limit = 4096   # for gpt-davinci dan gpt-3.5-turbo
used_tokens = calc_total_tokens(system_prompt + user_conversation))
max_tokens = token_limit - used_tokens

Does this address your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants