-
Notifications
You must be signed in to change notification settings - Fork 0
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
ChatGPT cog does not respect (or circumvent) 2000 character limit. #4
Comments
I've played with shortening the characters limit but as you've mentioned there are still situations where it goes over. I've typically used the bot in my server for short response and haven't had an issue, but will gladly welcome a Pull request. |
When I was using GPT 3.5 I had the token limit at 300 and I assume that just kept OpenAI from allocating the resources on their hardware that would lead to >2000 character responses in the first place. I might try lowering that again. When you say you use your bot for short responses, are you specifying this as an explicit instruction? That's how I currently work around it. To just append "Answer briefly." to everything. While I have a background in Software Engineering I'm not sure if I could be of much service in terms of contributing here. My assumption was that the |
As a workaround I've truncated the message if it goes over 2000 characters (3d56510). I may explore in the future either splitting up the response into multiple messages or adding the long reply as an attachment. As you mentioned playing with the token limit can help, but since tokens aren't an exact 1:1 mapping to character counts it takes some experimenting to get right. |
I've been experiencing this problem for a while now and with the switch to GPT 4 it's become more prevalent.
What happened:
![image](https://private-user-images.githubusercontent.com/75106673/332429413-c41ef6c9-6f4a-46b5-8c61-13606b6b9ea4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2Mzk4MjIsIm5iZiI6MTcyNDYzOTUyMiwicGF0aCI6Ii83NTEwNjY3My8zMzI0Mjk0MTMtYzQxZWY2YzktNmY0YS00NmI1LThjNjEtMTM2MDZiNmI5ZWE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDAyMzIwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg1MTVjZDMwZmE3NjNkNjY5Mzk0NmM1NjJjNDhkODU2NDlmYzdlZmUzNDBmY2FlNmIzY2RiMDMyMTE2ZjQ0ZDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._bZwuLKAEASGjH2VQxWogV-KJYNsUcNmgknlS0ojdJ0)
What should've happened:
The bot sends the response it gets from OpenAI. Possibly by splitting it up into multiple messages?
The text was updated successfully, but these errors were encountered: