acheong08/ChatGPT

6.5.0 version bug?

wqjuser opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

V3 2days ago update maybe not upload to pypi

Get response

    if os.environ.get("API_URL") and os.environ.get("MODEL_NAME"):
        # https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api
        url = os.environ.get("API_URL") + "openai/deployments/" + os.environ.get("MODEL_NAME") +"/chat/completions?api-version=2023-05-15"
        headers = {"Content-Type": "application/json", "api-key": self.api_key}
    else:
        url = "https://api.openai.com/v1/chat/completions"
        headers = {"Authorization": f"Bearer {kwargs.get('api_key', self.api_key)}"}

in else the url maybe should like 'url = os.environ.get("API_URL") or "https://api.openai.com/v1/chat/completions"'

Steps to reproduce the problem

just get response

What should have happened?

get response but get
Error: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001DA006F5810>, 'Connection to api.openai.com timed out. (connect timeout=None)'))

Version where the problem happens

6.5.0

What Python version are you running this with?

3.10.11

What is your operating system ?

Windows

Command Line Arguments

No

Console logs

Error: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001DA006F5810>, 'Connection to api.openai.com timed out. (connect timeout=None)'))

Additional information

No response

pushed to 6.6.0