Find answers from the community

Updated 3 months ago

Hi @Logan M , with gpt-3.5-turbo-16k-

Hi , with gpt-3.5-turbo-16k-0613, I often encounter an issue:
Attachment
image.png
W
R
L
11 comments
Seems like OpenAI APIs are having some issue πŸ€”
yeah, Idk if it's openai or the prompts we send
You could try checking the error using debugger and breakpoint on this file
antenv/lib/python3.11/site-packages/openai/_base_client.py
line 866


Maybe this help you find if the error is from OpenAI or the prompt that you use
Attachment
image.png
It is a timeout error, maybe try this

Plain Text
from llama_index.llms import OpenAI

llm = OpenAI(model="gpt-3.5-turbo-16k-0613", timeout=100)


You can check if this solves your problem. You can increase it further as well. Default is 60 secs
No it does not solve y problem, as you can see the problem come from many retry
and this is anormal
the "retrying request"
retry happens when the API fails, Put
openai.log="debug" at the top and check if it prints anything related to the error
New OpenAI client does not print any log with the above changes.

Use this at the top before importing openai
Plain Text
import os
os.environ['OPENAI_LOG'] = "debug"
You can also increase max_retries -- seems like openai is just a little unstable for "gpt-3.5-turbo-16k-0613"
Add a reply
Sign up and join the conversation on Discord