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

word count limit #7

Open
KrisFlowerss opened this issue Dec 16, 2023 · 4 comments
Open

word count limit #7

KrisFlowerss opened this issue Dec 16, 2023 · 4 comments

Comments

@KrisFlowerss
Copy link

KrisFlowerss commented Dec 16, 2023

After deployment, I found that there is a limit to the length of the answers. It automatically stops when reaching the maximum limit. How can I change this limit?

@nice2cu1
Copy link

I guessing it's the limitation caused by maxOutputTokens
See here

@nice2cu1
Copy link

nice2cu1 commented Dec 16, 2023

I guessing it's the limitation caused by maxOutputTokens See here

@KrisFlowerss Actually, it is this parameter that affects the length of the output text.
If you're deploying on Docker, you can define an environment variable for it as much as I did, or if you don't need to use an environment variable, then you can just pin the value of <=30720 directly to this parameter (why <=30720? Because I noticed that in Google AI Studio, the maximum value of the Chat prompt is 30720)
Changes need to be made in route.ts or you can see my fork route.ts
image

@KrisFlowerss
Copy link
Author

I guessing it's the limitation caused by maxOutputTokens See here

@KrisFlowerss Actually, it is this parameter that affects the length of the output text. If you're deploying on Docker, you can define an environment variable for it as much as I did, or if you don't need to use an environment variable, then you can just pin the value of <=30720 directly to this parameter (why <=30720? Because I noticed that in Google AI Studio, the maximum value of the Chat prompt is 30720) Changes need to be made in route.ts or you can see my fork route.ts image

you're right . I change numebr to 30000, it worked. thanks

@rajeshkanugu
Copy link
Collaborator

Do you want me to add a feature in the frontend to limit the numbers of tokens send to the frontend ?

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

3 participants