Well, that’ the same here. I have sent info to my security folks here and they haven’t gotten back to say they found any issue associated with the VPN config.
It still could be something wrong with the VPN, but there are an awful lot of people experiencing this issue when using the OpenAI Python library. I don’t have this issue when using requests. When it has happened in the past, it was very simple resolution, just export the cert from the site and add to the cacerts.pem file for the Python virtual environment. I have tried that in this case by getting the cert from api.openai.com. The cert doesn’t look quite right so maybe there’s something wrong with OpenAI’s self-signed certificate which would be ironic because the OpenAI Python library keeps complaining about a self-signed certificate in the chain.
Seriously though, OpenAI, can’t you put some resources on this to fix it so people can use it. It’s almost like you want people to NOT use your products. Or, at the very least, provide some guidance for those customers using some of the more popular VPNs out there like GlobalProtect, Cisco, etc.
This worked, thanks! Also, remember when clicking the lock icon on the left side of the URL, to select “Connection is Secure” to access the certificate. (In Google Chrome anyway)
This worked like a charm, thanks!! I pasted the certificate in my venv at [envname]/Lib/site-packages/certify
Hi Friends,
i’m facing the same issue, but with Azure OpenAI
here’s the error, pls suggest
APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='azuresandbox1.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/rak-gpt-35-turbo/completions?api-version=2022-12-01 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
#Note: The openai-python library support for Azure OpenAI is in preview.
import os
import openai
openai.api_type = "azure"
openai.api_base = "https://azuresandbox1.openai.azure.com/"
openai.api_version = "2022-12-01"
openai.api_key = os.getenv("OPENAI_API_KEY")
response = openai.Completion.create(
engine="raj-gpt-35-turbo",
prompt="Generate a summary of the below conversation in the following format:\nCustomer problem:\nOutcome of the conversation:\nAction items for follow-up:\nCustomer budget:\nDeparture city:\nDestination city:\n\nConversation:\nUser: Hi there, I’m off between August 25 and September 11. I saved up 4000 for a nice trip. If I flew out from San Francisco, what are your suggestions for where I can go?\nAgent: For that budget you could travel to cities in the US, Mexico, Brazil, Italy or Japan. Any preferences?\nUser: Excellent, I’ve always wanted to see Japan. What kind of hotel can I expect?\nAgent: Great, let me check what I have. First, can I just confirm with you that this is a trip for one adult?\nUser: Yes it is\nAgent: Great, thank you, In that case I can offer you 15 days at HOTEL Sugoi, a 3 star hotel close to a Palace. You would be staying there between August 25th and September 7th. They offer free wifi and have an excellent guest rating of 8.49/10. The entire package costs 2024.25USD. Should I book this for you?\nUser: That sounds really good actually. Please book me at Sugoi.\nAgent: I can do that for you! Can I help you with anything else today?\nUser: No, thanks! Please just send me the itinerary to my email soon.\n\nSummary: \nCustomer problem: The customer wants to travel between August 25 and September 11 with a budget of 4000 USD from San Francisco to a destination suggested by the agent.\nOutcome of the conversation: The agent suggested Japan as a destination and offered a 15-day stay at a 3-star hotel called Sugoi. The customer agreed to the offer and the agent booked the hotel for the customer.\nAction items for follow-up: The agent needs to send the itinerary to the customer's email.\nCustomer budget: 4000 USD\nDeparture city: San Francisco\nDestination city: Japan (exact location not specified)<|im_end|>",
temperature=0.3,
max_tokens=350,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
stop=None)