AndraxDev / speak-gpt

Your personal voice assistant based on OpenAI ChatGPT.
https://play.google.com/store/apps/details?id=org.teslasoft.assistant
Apache License 2.0
290 stars 59 forks source link

Error: "Too many tokens. It is an internal error, please report it. Also try to truncate your input. Sometimes it may help" #22

Closed ameeramer closed 1 year ago

ameeramer commented 1 year ago

(CONVERSATION FILE ATTACHED)

I was using the Interactive Game prompt and it was so immersive I got deep into it, but suddenlty I got the error: "Too many tokens. It is an internal error, please report it. Also try to truncate your input. Sometimes it may help."

Does anyone know of a way to fix it? 411aecdf6180870cb448ec94a6bc99a42e12a5226681c264d0f3d48292e3b10c.txt

AndraxDev commented 1 year ago

After short check i noticed that your conversation uses 8239, but 8192 is allowed.

AndraxDev commented 1 year ago

This restriction is put by OpenAI, not by us.

ameeramer commented 1 year ago

This restriction is put by OpenAI, not by us.

Do you know if I can extend this limit at OpenAI?

ameeramer commented 1 year ago

Also I tried to use gpt4-entended model but got the error "Looks like this model (gpt-4-32k) is not available to you right now..." even though I joined gpt-4 api waitlist.

AndraxDev commented 1 year ago

1) You can not extend limits. These limits are physical capabilities of AI models.

2) GPT4-32k is not available for you. If you have been approved in waitlist you've got access only to GPT4-8k.

3) We can not contact OpenAI and our products are not affiliated with OpenAI.

4) I recommend you to read OpenAI documentation before reporting problems: https://platform.openai.com/docs/api-reference

Thanks for understanding!

ameeramer commented 1 year ago

Suggestion: allow the continuation of conversation even if the cap of tokens is reached by inputing to the model only the last maximum tokens possible; instead of preventing the conversation to continue at all

AndraxDev commented 1 year ago

It's not possible. Assistant will drop previous messages (including activation prompt).

AndraxDev commented 1 year ago

I can't hack AI model or influence on its capacity. Like other Transformers, GPT has their limitations.

AndraxDev commented 1 year ago

The error you see is not our restriction. It is OpenAI server response. Yes, OpenAI will not return you expected output if error is occurred. The max tokens errors is not generated inside SpeakGPT. SpeakGPT can't count amount of tokens as is does not contain tokenizer. SpeakGPT is able only provide server output in convient way.

ameeramer commented 1 year ago

I see 👍