I am trying to run the L2 lab from deeplearning.ai course in my local Jupyter notebook. I have the correct version of Python and have used the requirements.txt file that was in the first lesson for setup.
My OpenAi key connects fine to the gpt-3.5-turbo model via another test call.
When I run the following code, however, I get an error shown below:
from llama_index.llms.openai import OpenAI
llm = OpenAI(model="gpt-3.5-turbo") response = llm.predict_and_call( [add_tool, mystery_tool], "Tell me the output of the mystery function on 2 and 9", verbose=True )
print(str(response)) The error is:
Retrying llama_index.llms.openai.base.OpenAI._chat in 0.974705252265967 seconds as it raised APIConnectionError: Connection error…
This occurs a few times and then the whole call errors out with a long trace.
This is as simple a call as I can think of and it still seems to fail. Any ideas?