Antonio Cheong
commited on
Commit
·
6a37cab
1
Parent(s):
ff34ac0
fix #113
Browse files- setup.py +4 -6
- src/EdgeGPT.py +2 -3
setup.py
CHANGED
@@ -3,7 +3,7 @@ from setuptools import setup
|
|
3 |
|
4 |
setup(
|
5 |
name="EdgeGPT",
|
6 |
-
version="0.0.
|
7 |
license="GNU General Public License v2.0",
|
8 |
author="Antonio Cheong",
|
9 |
author_email="[email protected]",
|
@@ -11,10 +11,8 @@ setup(
|
|
11 |
packages=find_packages("src"),
|
12 |
package_dir={"": "src"},
|
13 |
url="https://github.com/acheong08/EdgeGPT",
|
14 |
-
project_urls={
|
15 |
-
"
|
16 |
-
},
|
17 |
-
install_requires=["asyncio", "requests", "websockets"],
|
18 |
long_description=open("README.md", encoding="utf-8").read(),
|
19 |
long_description_content_type="text/markdown",
|
20 |
py_modules=["EdgeGPT"],
|
@@ -26,5 +24,5 @@ setup(
|
|
26 |
"Programming Language :: Python :: 3.9",
|
27 |
"Programming Language :: Python :: 3.10",
|
28 |
"Programming Language :: Python :: 3.11",
|
29 |
-
]
|
30 |
)
|
|
|
3 |
|
4 |
setup(
|
5 |
name="EdgeGPT",
|
6 |
+
version="0.0.56",
|
7 |
license="GNU General Public License v2.0",
|
8 |
author="Antonio Cheong",
|
9 |
author_email="[email protected]",
|
|
|
11 |
packages=find_packages("src"),
|
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"],
|
|
|
|
|
16 |
long_description=open("README.md", encoding="utf-8").read(),
|
17 |
long_description_content_type="text/markdown",
|
18 |
py_modules=["EdgeGPT"],
|
|
|
24 |
"Programming Language :: Python :: 3.9",
|
25 |
"Programming Language :: Python :: 3.10",
|
26 |
"Programming Language :: Python :: 3.11",
|
27 |
+
],
|
28 |
)
|
src/EdgeGPT.py
CHANGED
@@ -15,7 +15,7 @@ from typing import Literal
|
|
15 |
from typing import Optional
|
16 |
from typing import Union
|
17 |
|
18 |
-
import
|
19 |
import websockets.client as websockets
|
20 |
|
21 |
DELIMITER = "\x1e"
|
@@ -156,7 +156,7 @@ class Conversation:
|
|
156 |
"conversationSignature": None,
|
157 |
"result": {"value": "Success", "message": None},
|
158 |
}
|
159 |
-
self.session =
|
160 |
self.session.headers.update(
|
161 |
{
|
162 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
@@ -179,7 +179,6 @@ class Conversation:
|
|
179 |
url,
|
180 |
timeout=30,
|
181 |
headers=HEADERS,
|
182 |
-
allow_redirects=True,
|
183 |
)
|
184 |
if response.status_code != 200:
|
185 |
print(f"Status code: {response.status_code}")
|
|
|
15 |
from typing import Optional
|
16 |
from typing import Union
|
17 |
|
18 |
+
import httpx
|
19 |
import websockets.client as websockets
|
20 |
|
21 |
DELIMITER = "\x1e"
|
|
|
156 |
"conversationSignature": None,
|
157 |
"result": {"value": "Success", "message": None},
|
158 |
}
|
159 |
+
self.session = httpx.Client()
|
160 |
self.session.headers.update(
|
161 |
{
|
162 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
|
|
179 |
url,
|
180 |
timeout=30,
|
181 |
headers=HEADERS,
|
|
|
182 |
)
|
183 |
if response.status_code != 200:
|
184 |
print(f"Status code: {response.status_code}")
|