Subject: Issue with OpenAI Python Library (Version 0.27.2) - InvalidRequestError
Dear OpenAI Support Team,
I hope this message finds you well. I have been encountering an issue while trying to use the GPT-3.5 Turbo model with the OpenAI Python library (version 0.27.2) and would appreciate your assistance in resolving the problem.
Here are the relevant details:
- OpenAI Python library version: 0.27.2
- Example code used:
goCopy code
import openai
openai.api_key = "your_api_key_here"
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Tell me a joke."},
]
response = openai.ChatCompletion.create(
engine="gpt-3.5-turbo",
messages=messages,
)
print(response.choices[0].message["content"])
- Error message encountered: “InvalidRequestError: Invalid URL (POST /v1/engines/gpt-3.5-turbo/chat/completions)”
I have tried uninstalling and reinstalling the OpenAI Python library, but the issue persists. Based on the information provided, I would appreciate any guidance or suggestions on how to resolve this problem.
Thank you for your time and support.
Best regards,