Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
fix #113
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Cheong committed Mar 13, 2023
1 parent ff34ac0 commit 6a37cab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@

setup(
name="EdgeGPT",
version="0.0.55",
version="0.0.56",
license="GNU General Public License v2.0",
author="Antonio Cheong",
author_email="[email protected]",
description="Reverse engineered Edge Chat API",
packages=find_packages("src"),
package_dir={"": "src"},
url="https://github.com/acheong08/EdgeGPT",
project_urls={
"Bug Report": "https://github.com/acheong08/EdgeGPT/issues/new"
},
install_requires=["asyncio", "requests", "websockets"],
project_urls={"Bug Report": "https://github.com/acheong08/EdgeGPT/issues/new"},
install_requires=["asyncio", "httpx", "websockets"],
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
py_modules=["EdgeGPT"],
Expand All @@ -26,5 +24,5 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
],
)
5 changes: 2 additions & 3 deletions src/EdgeGPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from typing import Optional
from typing import Union

import requests
import httpx
import websockets.client as websockets

DELIMITER = "\x1e"
Expand Down Expand Up @@ -156,7 +156,7 @@ def __init__(self, cookiePath: str = "", cookies: Optional[dict] = None) -> None
"conversationSignature": None,
"result": {"value": "Success", "message": None},
}
self.session = requests.Session()
self.session = httpx.Client()
self.session.headers.update(
{
"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",
Expand All @@ -179,7 +179,6 @@ def __init__(self, cookiePath: str = "", cookies: Optional[dict] = None) -> None
url,
timeout=30,
headers=HEADERS,
allow_redirects=True,
)
if response.status_code != 200:
print(f"Status code: {response.status_code}")
Expand Down

0 comments on commit 6a37cab

Please sign in to comment.