Antonio Cheong commited on
Commit
cad729e
·
1 Parent(s): e3c724c
Files changed (2) hide show
  1. setup.py +1 -1
  2. src/EdgeGPT.py +5 -0
setup.py CHANGED
@@ -12,7 +12,7 @@ setup(
12
  package_dir={"": "src"},
13
  url="https://github.com/acheong08/EdgeGPT",
14
  project_urls={"Bug Report": "https://github.com/acheong08/EdgeGPT/issues/new"},
15
- install_requires=["asyncio", "httpx", "websockets", "rich"],
16
  long_description=open("README.md", encoding="utf-8").read(),
17
  long_description_content_type="text/markdown",
18
  py_modules=["EdgeGPT"],
 
12
  package_dir={"": "src"},
13
  url="https://github.com/acheong08/EdgeGPT",
14
  project_urls={"Bug Report": "https://github.com/acheong08/EdgeGPT/issues/new"},
15
+ install_requires=["asyncio", "httpx", "websockets", "rich", "certifi"],
16
  long_description=open("README.md", encoding="utf-8").read(),
17
  long_description_content_type="text/markdown",
18
  py_modules=["EdgeGPT"],
src/EdgeGPT.py CHANGED
@@ -15,6 +15,8 @@ from typing import Optional
15
  from typing import Union
16
  from rich.markdown import Markdown
17
  from rich.live import Live
 
 
18
 
19
  import httpx
20
  import websockets.client as websockets
@@ -73,6 +75,9 @@ HEADERS_INIT_CONVER = {
73
  "x-edge-shopping-flag": "1",
74
  }
75
 
 
 
 
76
 
77
  class NotAllowedToAccess(Exception):
78
  pass
 
15
  from typing import Union
16
  from rich.markdown import Markdown
17
  from rich.live import Live
18
+ import ssl
19
+ import certifi
20
 
21
  import httpx
22
  import websockets.client as websockets
 
75
  "x-edge-shopping-flag": "1",
76
  }
77
 
78
+ ssl_context = ssl.create_default_context()
79
+ ssl_context.load_verify_locations(certifi.where())
80
+
81
 
82
  class NotAllowedToAccess(Exception):
83
  pass