ChatGPT-in-Slack icon indicating copy to clipboard operation
ChatGPT-in-Slack copied to clipboard

OpenAI Error

Open krrishdholakia opened this issue 1 year ago • 1 comments

Hi @seratch

Facing a context window limitation error.

Would recommend wrapping the openai base with something like reliableGPT to handle retries, model switching, etc.

from reliablegpt import reliableGPT
openai.ChatCompletion.create = reliableGPT(openai.ChatCompletion.create, user_email=...)

Source: https://github.com/BerriAI/reliableGPT

krrishdholakia avatar Jun 21 '23 23:06 krrishdholakia

Hi @krrishdholakia, thanks for writing in! I myself never experienced the error. Can you share more details on it, such as the model you're using and stacktrace? This app has its own logic to decide the tokens to send: https://github.com/seratch/ChatGPT-in-Slack/blob/main/app/openai_ops.py

I am not sure if we can easily switch to reliableGPT without changing the app's behavior, but if we can do so, I am happy to rely on well-maintained library.

seratch avatar Jun 21 '23 23:06 seratch