updates to makefile and chatgpt

main
Thamognya Kodi 2023-01-18 14:35:30 +07:00
parent b6a0b92afc
commit 5cde349db0
No known key found for this signature in database
GPG Key ID: 2701511C082EDAB5
4 changed files with 231 additions and 325 deletions

View File

@ -74,8 +74,15 @@ lint: test check-codestyle mypy check-safety
.PHONY: update-dev-deps
update-dev-deps:
poetry add -D bandit@latest darglint@latest "isort[colors]@latest" mypy@latest pre-commit@latest pydocstyle@latest pylint@latest pytest@latest pyupgrade@latest safety@latest coverage@latest coverage-badge@latest pytest-html@latest pytest-cov@latest
poetry add -D --allow-prereleases black@latest
poetry add --group dev bandit@latest darglint@latest "isort[colors]@latest" mypy@latest pre-commit@latest pydocstyle@latest pylint@latest pytest@latest pyupgrade@latest safety@latest coverage@latest coverage-badge@latest pytest-html@latest pytest-cov@latest
poetry add --group dev --allow-prereleases black@latest
.PHONY: update-deps
update-deps: poetry update --lock && pip install -r requirements.txt
.PHONY: update
update: update-dev-deps update-deps
#* Container / Docker
# Example: make container-build VERSION=latest

View File

@ -1,20 +1,15 @@
# type: ignore
# For some reason package not working so just deal with it and dont ask questions
# Copied and updated from https://github.com/acheong08/ChatGPT/blob/main/src/revChatGPT/ChatGPT.py
# credits to https://github.com/acheong08/ChatGPT
import json
import logging
import re
import uuid
from time import sleep
import tls_client
import uuid, re, json, tls_client, logging
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from time import sleep
from twocaptcha import TwoCaptcha
# Disable all logging
logging.basicConfig(level=logging.ERROR)
@ -22,16 +17,17 @@ BASE_URL = "https://chat.openai.com/"
class Chrome(uc.Chrome):
def __del__(self):
self.quit()
class Chatbot:
def __init__(
self, config, conversation_id=None, parent_id=None, no_refresh=False
) -> None:
def __init__(self, config, conversation_id=None, parent_id=None, no_refresh=False) -> None:
self.config = config
self.session = tls_client.Session(client_identifier="chrome_108")
self.session = tls_client.Session(
client_identifier="chrome_108"
)
if "proxy" in config:
if type(config["proxy"]) != str:
raise Exception("Proxy must be a string!")
@ -54,9 +50,9 @@ class Chatbot:
self.isMicrosoftLogin = False
self.twocaptcha_key = None
# stdout colors
self.GREEN = "\033[92m"
self.WARNING = "\033[93m"
self.ENDCOLOR = "\033[0m"
self.GREEN = '\033[92m'
self.WARNING = '\033[93m'
self.ENDCOLOR = '\033[0m'
if "email" in config and "password" in config:
if type(config["email"]) != str:
raise Exception("Email must be a string!")
@ -82,8 +78,7 @@ class Chatbot:
raise Exception("Session token must be a string!")
self.session_token = config["session_token"]
self.session.cookies.set(
"__Secure-next-auth.session-token", config["session_token"]
)
"__Secure-next-auth.session-token", config["session_token"])
self.get_cf_cookies()
else:
raise Exception("Invalid config!")
@ -96,21 +91,15 @@ class Chatbot:
try:
self.refresh_session()
refresh = False
except Exception:
except Exception as exc:
if retries == 0:
raise Exception("Failed to refresh session!")
raise exc
retries -= 1
def ask(
self,
prompt,
conversation_id=None,
parent_id=None,
gen_title=False,
session_token=None,
):
def ask(self, prompt, conversation_id=None, parent_id=None, gen_title=False, session_token=None):
if session_token:
self.session.cookies.set("__Secure-next-auth.session-token", session_token)
self.session.cookies.set(
"__Secure-next-auth.session-token", session_token)
self.session_token = session_token
self.config["session_token"] = session_token
self.retry_refresh()
@ -118,11 +107,8 @@ class Chatbot:
if conversation_id == None:
conversation_id = self.conversation_id
if parent_id == None:
parent_id = (
self.parent_id
if conversation_id == self.conversation_id
else self.conversation_mapping[conversation_id]
)
parent_id = self.parent_id if conversation_id == self.conversation_id else self.conversation_mapping[
conversation_id]
data = {
"action": "next",
"messages": [
@ -137,12 +123,13 @@ class Chatbot:
"model": "text-davinci-002-render",
}
new_conv = data["conversation_id"] is None
self.conversation_id_prev_queue.append(data["conversation_id"]) # for rollback
self.conversation_id_prev_queue.append(
data["conversation_id"]) # for rollback
self.parent_id_prev_queue.append(data["parent_message_id"])
response = self.session.post(
url=BASE_URL + "backend-api/conversation",
data=json.dumps(data),
timeout_seconds=180,
timeout_seconds=180
)
if response.status_code != 200:
print(response.text)
@ -168,12 +155,12 @@ class Chatbot:
}
if gen_title and new_conv:
try:
title = self.gen_title(self.conversation_id, self.parent_id)[
"title"
]
title = self.gen_title(
self.conversation_id, self.parent_id)["title"]
except Exception as exc:
split = prompt.split(" ")
title = " ".join(split[:3]) + ("..." if len(split) > 3 else "")
title = " ".join(split[:3]) + \
("..." if len(split) > 3 else "")
res["title"] = title
return res
else:
@ -185,7 +172,8 @@ class Chatbot:
raise Exception("Response code error: ", response.status_code)
def get_conversations(self, offset=0, limit=20):
url = BASE_URL + f"backend-api/conversations?offset={offset}&limit={limit}"
url = BASE_URL + \
f"backend-api/conversations?offset={offset}&limit={limit}"
response = self.session.get(url)
self.check_response(response)
data = json.loads(response.text)
@ -200,19 +188,15 @@ class Chatbot:
def gen_title(self, id, message_id):
url = BASE_URL + f"backend-api/conversation/gen_title/{id}"
response = self.session.post(
url,
data=json.dumps(
{"message_id": message_id, "model": "text-davinci-002-render"}
),
)
response = self.session.post(url, data=json.dumps(
{"message_id": message_id, "model": "text-davinci-002-render"}))
self.check_response(response)
data = json.loads(response.text)
return data
def change_title(self, id, title):
url = BASE_URL + f"backend-api/conversation/{id}"
response = self.session.patch(url, data=f'{{"title": {title}}}')
response = self.session.patch(url, data=f'{{"title": "{title}"}}')
self.check_response(response)
def delete_conversation(self, id):
@ -228,7 +212,8 @@ class Chatbot:
def refresh_session(self, session_token=None):
if session_token:
self.session.cookies.set("__Secure-next-auth.session-token", session_token)
self.session.cookies.set(
"__Secure-next-auth.session-token", session_token)
self.session_token = session_token
self.config["session_token"] = session_token
url = BASE_URL + "api/auth/session"
@ -239,21 +224,15 @@ class Chatbot:
try:
if "error" in response.json():
raise Exception(
f"Failed to refresh session! Error: {response.json()['error']}"
)
elif (
response.status_code != 200
or response.json() == {}
or "accessToken" not in response.json()
):
raise Exception("Failed to refresh session!")
f"Failed to refresh session! Error: {response.json()['error']}")
elif response.status_code != 200 or response.json() == {} or "accessToken" not in response.json():
raise Exception(f'Response code: {response.status_code} \n Response: {response.text}')
else:
self.session.headers.update(
{"Authorization": "Bearer " + response.json()["accessToken"]}
)
self.session.headers.update({
"Authorization": "Bearer " + response.json()["accessToken"]
})
self.session_token = self.session.cookies._find(
"__Secure-next-auth.session-token",
)
"__Secure-next-auth.session-token", )
except Exception as exc:
print("Failed to refresh session!")
if self.isMicrosoftLogin:
@ -289,86 +268,65 @@ class Chatbot:
options = self.__get_ChromeOptions()
print("Spawning browser...")
driver = uc.Chrome(
enable_cdp_events=True,
options=options,
enable_cdp_events=True, options=options,
driver_executable_path=self.config.get("driver_exec_path"),
browser_executable_path=self.config.get("browser_exec_path"),
browser_executable_path=self.config.get("browser_exec_path")
)
print("Browser spawned.")
driver.add_cdp_listener(
"Network.responseReceivedExtraInfo",
lambda msg: self.detect_cookies(msg),
)
"Network.responseReceivedExtraInfo", lambda msg: self.detect_cookies(msg))
driver.add_cdp_listener(
"Network.requestWillBeSentExtraInfo",
lambda msg: self.detect_user_agent(msg),
)
"Network.requestWillBeSentExtraInfo", lambda msg: self.detect_user_agent(msg))
driver.get(BASE_URL)
while not self.agent_found or not self.cf_cookie_found:
sleep(5)
self.refresh_headers(
cf_clearance=self.cf_clearance, user_agent=self.user_agent
)
self.refresh_headers(cf_clearance=self.cf_clearance,
user_agent=self.user_agent)
# Wait for the login button to appear
WebDriverWait(driver, 120).until(
EC.element_to_be_clickable(
(By.XPATH, "//button[contains(text(), 'Log in')]")
)
)
WebDriverWait(driver, 120).until(EC.element_to_be_clickable(
(By.XPATH, "//button[contains(text(), 'Log in')]")))
# Click the login button
driver.find_element(
by=By.XPATH, value="//button[contains(text(), 'Log in')]"
).click()
by=By.XPATH, value="//button[contains(text(), 'Log in')]").click()
# Wait for the Login with Microsoft button to be clickable
WebDriverWait(driver, 60).until(
EC.element_to_be_clickable(
(By.XPATH, "//button[@data-provider='windowslive']")
)
)
WebDriverWait(driver, 60).until(EC.element_to_be_clickable(
(By.XPATH, "//button[@data-provider='windowslive']")))
# Click the Login with Microsoft button
driver.find_element(
by=By.XPATH, value="//button[@data-provider='windowslive']"
).click()
by=By.XPATH, value="//button[@data-provider='windowslive']").click()
# Wait for the email input field to appear
WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.XPATH, "//input[@type='email']"))
)
WebDriverWait(driver, 60).until(EC.visibility_of_element_located(
(By.XPATH, "//input[@type='email']")))
# Enter the email
driver.find_element(by=By.XPATH, value="//input[@type='email']").send_keys(
self.config["email"]
)
driver.find_element(
by=By.XPATH, value="//input[@type='email']").send_keys(self.config["email"])
# Wait for the Next button to be clickable
WebDriverWait(driver, 60).until(
EC.element_to_be_clickable((By.XPATH, "//input[@type='submit']"))
)
WebDriverWait(driver, 60).until(EC.element_to_be_clickable(
(By.XPATH, "//input[@type='submit']")))
# Click the Next button
driver.find_element(by=By.XPATH, value="//input[@type='submit']").click()
driver.find_element(
by=By.XPATH, value="//input[@type='submit']").click()
# Wait for the password input field to appear
WebDriverWait(driver, 60).until(
EC.visibility_of_element_located(
(By.XPATH, "//input[@type='password']")
)
)
WebDriverWait(driver, 60).until(EC.visibility_of_element_located(
(By.XPATH, "//input[@type='password']")))
# Enter the password
driver.find_element(
by=By.XPATH, value="//input[@type='password']"
).send_keys(self.config["password"])
by=By.XPATH, value="//input[@type='password']").send_keys(self.config["password"])
# Wait for the Sign in button to be clickable
WebDriverWait(driver, 60).until(
EC.element_to_be_clickable((By.XPATH, "//input[@type='submit']"))
)
WebDriverWait(driver, 60).until(EC.element_to_be_clickable(
(By.XPATH, "//input[@type='submit']")))
# Click the Sign in button
driver.find_element(by=By.XPATH, value="//input[@type='submit']").click()
driver.find_element(
by=By.XPATH, value="//input[@type='submit']").click()
# Wait for the Allow button to appear
WebDriverWait(driver, 60).until(
EC.element_to_be_clickable((By.XPATH, "//input[@type='submit']"))
)
WebDriverWait(driver, 60).until(EC.element_to_be_clickable(
(By.XPATH, "//input[@type='submit']")))
# click Yes button
driver.find_element(by=By.XPATH, value="//input[@type='submit']").click()
driver.find_element(
by=By.XPATH, value="//input[@type='submit']").click()
# wait for input box to appear (to make sure we're signed in)
WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.XPATH, "//textarea"))
)
WebDriverWait(driver, 60).until(EC.visibility_of_element_located(
(By.XPATH, "//textarea")))
while not self.session_cookie_found:
sleep(5)
print(self.GREEN + "Login successful." + self.ENDCOLOR)
@ -385,26 +343,20 @@ class Chatbot:
"""
twocaptcha_key = self.twocaptcha_key
twocaptcha_solver_config = {
"apiKey": twocaptcha_key,
"defaultTimeout": 120,
"recaptchaTimeout": 600,
"pollingInterval": 10,
'apiKey': twocaptcha_key,
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
twocaptcha_solver = TwoCaptcha(**twocaptcha_solver_config)
print("Waiting for captcha to be solved...")
print('Waiting for captcha to be solved...')
solved_captcha = twocaptcha_solver.recaptcha(
sitekey="6Lc-wnQjAAAAADa5SPd68d0O3xmj0030uaVzpnXP",
url="https://auth0.openai.com/u/login/identifier",
)
sitekey='6Lc-wnQjAAAAADa5SPd68d0O3xmj0030uaVzpnXP', url="https://auth0.openai.com/u/login/identifier")
if "code" in solved_captcha:
print(self.GREEN + "Captcha solved successfully!" + self.ENDCOLOR)
if self.verbose:
print(
self.GREEN
+ "Captcha token: "
+ self.ENDCOLOR
+ solved_captcha["code"]
)
print(self.GREEN + "Captcha token: " +
self.ENDCOLOR + solved_captcha["code"])
return solved_captcha
def email_login(self, solved_captcha) -> None:
@ -423,105 +375,74 @@ class Chatbot:
options = self.__get_ChromeOptions()
print("Spawning browser...")
driver = uc.Chrome(
enable_cdp_events=True,
options=options,
enable_cdp_events=True, options=options,
driver_executable_path=self.config.get("driver_exec_path"),
browser_executable_path=self.config.get("browser_exec_path"),
browser_executable_path=self.config.get("browser_exec_path")
)
print("Browser spawned.")
driver.add_cdp_listener(
"Network.responseReceivedExtraInfo",
lambda msg: self.detect_cookies(msg),
)
"Network.responseReceivedExtraInfo", lambda msg: self.detect_cookies(msg))
driver.add_cdp_listener(
"Network.requestWillBeSentExtraInfo",
lambda msg: self.detect_user_agent(msg),
)
"Network.requestWillBeSentExtraInfo", lambda msg: self.detect_user_agent(msg))
driver.get(BASE_URL)
while not self.agent_found or not self.cf_cookie_found:
sleep(5)
self.refresh_headers(
cf_clearance=self.cf_clearance, user_agent=self.user_agent
)
self.refresh_headers(cf_clearance=self.cf_clearance,
user_agent=self.user_agent)
# Wait for the login button to appear
WebDriverWait(driver, 120).until(
EC.element_to_be_clickable(
(By.XPATH, "//button[contains(text(), 'Log in')]")
)
)
WebDriverWait(driver, 120).until(EC.element_to_be_clickable(
(By.XPATH, "//button[contains(text(), 'Log in')]")))
# Click the login button
driver.find_element(
by=By.XPATH, value="//button[contains(text(), 'Log in')]"
).click()
by=By.XPATH, value="//button[contains(text(), 'Log in')]").click()
# Wait for the email input field to appear
WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.ID, "username"))
)
WebDriverWait(driver, 60).until(EC.visibility_of_element_located(
(By.ID, "username")))
# Enter the email
driver.find_element(by=By.ID, value="username").send_keys(
self.config["email"]
)
self.config["email"])
# Wait for Recaptcha to appear
WebDriverWait(driver, 60).until(
EC.presence_of_element_located(
(By.CSS_SELECTOR, "*[name*='g-recaptcha-response']")
)
)
WebDriverWait(driver, 60).until(EC.presence_of_element_located(
(By.CSS_SELECTOR, "*[name*='g-recaptcha-response']")))
# Find Recaptcha
google_captcha_response_input = driver.find_element(
By.CSS_SELECTOR, "*[name*='g-recaptcha-response']"
)
captcha_input = driver.find_element(By.NAME, "captcha")
By.CSS_SELECTOR, "*[name*='g-recaptcha-response']")
captcha_input = driver.find_element(By.NAME, 'captcha')
# Make input visible
driver.execute_script(
"arguments[0].setAttribute('style','type: text; visibility:visible;');",
google_captcha_response_input,
)
driver.execute_script(
"arguments[0].setAttribute('style','type: text; visibility:visible;');",
captcha_input,
)
driver.execute_script(
"""
driver.execute_script("arguments[0].setAttribute('style','type: text; visibility:visible;');",
google_captcha_response_input)
driver.execute_script("arguments[0].setAttribute('style','type: text; visibility:visible;');",
captcha_input)
driver.execute_script("""
document.getElementById("g-recaptcha-response").innerHTML = arguments[0]
""",
solved_captcha.get("code"),
)
driver.execute_script(
"""
""", solved_captcha.get('code'))
driver.execute_script("""
document.querySelector("input[name='captcha']").value = arguments[0]
""",
solved_captcha.get("code"),
)
""", solved_captcha.get('code'))
# Hide the captcha input
driver.execute_script(
"arguments[0].setAttribute('style', 'display:none;');",
google_captcha_response_input,
)
driver.execute_script("arguments[0].setAttribute('style', 'display:none;');",
google_captcha_response_input)
# Wait for the Continue button to be clickable
WebDriverWait(driver, 60).until(
EC.element_to_be_clickable((By.XPATH, "//button[@type='submit']"))
)
WebDriverWait(driver, 60).until(EC.element_to_be_clickable(
(By.XPATH, "//button[@type='submit']")))
# Click the Continue button
driver.find_element(by=By.XPATH, value="//button[@type='submit']").click()
driver.find_element(
by=By.XPATH, value="//button[@type='submit']").click()
# Wait for the password input field to appear
WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.ID, "password"))
)
WebDriverWait(driver, 60).until(EC.visibility_of_element_located(
(By.ID, "password")))
# Enter the password
driver.find_element(by=By.ID, value="password").send_keys(
self.config["password"]
)
self.config["password"])
# Wait for the Sign in button to be clickable
WebDriverWait(driver, 60).until(
EC.element_to_be_clickable((By.XPATH, "//button[@type='submit']"))
)
WebDriverWait(driver, 60).until(EC.element_to_be_clickable(
(By.XPATH, "//button[@type='submit']")))
# Click the Sign in button
driver.find_element(by=By.XPATH, value="//button[@type='submit']").click()
driver.find_element(
by=By.XPATH, value="//button[@type='submit']").click()
# wait for input box to appear (to make sure we're signed in)
WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.XPATH, "//textarea"))
)
WebDriverWait(driver, 60).until(EC.visibility_of_element_located(
(By.XPATH, "//textarea")))
while not self.session_cookie_found:
sleep(5)
print(self.GREEN + "Login successful." + self.ENDCOLOR)
@ -532,14 +453,13 @@ class Chatbot:
def __get_ChromeOptions(self):
options = uc.ChromeOptions()
options.add_argument("--start_maximized")
options.add_argument('--start_maximized')
options.add_argument("--disable-extensions")
options.add_argument("--disable-application-cache")
options.add_argument("--disable-gpu")
options.add_argument('--disable-application-cache')
options.add_argument('--disable-gpu')
options.add_argument("--no-sandbox")
options.add_argument("--disable-setuid-sandbox")
options.add_argument("--disable-dev-shm-usage")
# options.add_argument('--headless')
if self.config.get("proxy", "") != "":
options.add_argument("--proxy-server=" + self.config["proxy"])
return options
@ -558,20 +478,15 @@ class Chatbot:
options = self.__get_ChromeOptions()
print("Spawning browser...")
driver = uc.Chrome(
enable_cdp_events=True,
options=options,
enable_cdp_events=True, options=options,
driver_executable_path=self.config.get("driver_exec_path"),
browser_executable_path=self.config.get("browser_exec_path"),
browser_executable_path=self.config.get("browser_exec_path")
)
print("Browser spawned.")
driver.add_cdp_listener(
"Network.responseReceivedExtraInfo",
lambda msg: self.detect_cookies(msg),
)
"Network.responseReceivedExtraInfo", lambda msg: self.detect_cookies(msg))
driver.add_cdp_listener(
"Network.requestWillBeSentExtraInfo",
lambda msg: self.detect_user_agent(msg),
)
"Network.requestWillBeSentExtraInfo", lambda msg: self.detect_user_agent(msg))
driver.get("https://chat.openai.com/chat")
while not self.agent_found or not self.cf_cookie_found:
sleep(5)
@ -579,22 +494,18 @@ class Chatbot:
# Close the browser
driver.quit()
del driver
self.refresh_headers(
cf_clearance=self.cf_clearance, user_agent=self.user_agent
)
self.refresh_headers(cf_clearance=self.cf_clearance,
user_agent=self.user_agent)
def detect_cookies(self, message):
if "params" in message:
if "headers" in message["params"]:
if "set-cookie" in message["params"]["headers"]:
if 'params' in message:
if 'headers' in message['params']:
if 'set-cookie' in message['params']['headers']:
# Use regex to get the cookie for cf_clearance=*;
cf_clearance_cookie = re.search(
"cf_clearance=.*?;", message["params"]["headers"]["set-cookie"]
)
"cf_clearance=.*?;", message['params']['headers']['set-cookie'])
session_cookie = re.search(
"__Secure-next-auth.session-token=.*?;",
message["params"]["headers"]["set-cookie"],
)
"__Secure-next-auth.session-token=.*?;", message['params']['headers']['set-cookie'])
if cf_clearance_cookie and not self.cf_cookie_found:
print("Found Cloudflare Cookie!")
# remove the semicolon and 'cf_clearance=' from the string
@ -602,55 +513,46 @@ class Chatbot:
self.cf_clearance = raw_cf_cookie.split("=")[1][:-1]
if self.verbose:
print(
self.GREEN
+ "Cloudflare Cookie: "
+ self.ENDCOLOR
+ self.cf_clearance
)
self.GREEN+"Cloudflare Cookie: "+self.ENDCOLOR + self.cf_clearance)
self.cf_cookie_found = True
if session_cookie and not self.session_cookie_found:
print("Found Session Token!")
# remove the semicolon and '__Secure-next-auth.session-token=' from the string
raw_session_cookie = session_cookie.group(0)
self.session_token = raw_session_cookie.split("=")[1][:-1]
self.session_token = raw_session_cookie.split("=")[
1][:-1]
self.session.cookies.set(
"__Secure-next-auth.session-token", self.session_token
)
"__Secure-next-auth.session-token", self.session_token)
if self.verbose:
print(
self.GREEN
+ "Session Token: "
+ self.ENDCOLOR
+ self.session_token
)
self.GREEN+"Session Token: "+self.ENDCOLOR + self.session_token)
self.session_cookie_found = True
def detect_user_agent(self, message):
if "params" in message:
if "headers" in message["params"]:
if "user-agent" in message["params"]["headers"]:
if 'params' in message:
if 'headers' in message['params']:
if 'user-agent' in message['params']['headers']:
# Use regex to get the cookie for cf_clearance=*;
user_agent = message["params"]["headers"]["user-agent"]
user_agent = message['params']['headers']['user-agent']
self.user_agent = user_agent
self.agent_found = True
self.refresh_headers(cf_clearance=self.cf_clearance, user_agent=self.user_agent)
self.refresh_headers(cf_clearance=self.cf_clearance,
user_agent=self.user_agent)
def refresh_headers(self, cf_clearance, user_agent):
del self.session.cookies["cf_clearance"]
self.session.headers.clear()
self.session.cookies.set("cf_clearance", cf_clearance)
self.session.headers.update(
{
"Accept": "text/event-stream",
"Authorization": "Bearer ",
"Content-Type": "application/json",
"User-Agent": user_agent,
"X-Openai-Assistant-App-Id": "",
"Connection": "close",
"Accept-Language": "en-US,en;q=0.9",
"Referer": "https://chat.openai.com/chat",
}
)
self.session.headers.update({
"Accept": "text/event-stream",
"Authorization": "Bearer ",
"Content-Type": "application/json",
"User-Agent": user_agent,
"X-Openai-Assistant-App-Id": "",
"Connection": "close",
"Accept-Language": "en-US,en;q=0.9",
"Referer": "https://chat.openai.com/chat",
})
def rollback_conversation(self, num=1) -> None:
"""

131
poetry.lock generated
View File

@ -298,6 +298,7 @@ mypy-extensions = ">=0.4.3"
pathspec = ">=0.9.0"
platformdirs = ">=2"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}
[package.extras]
colorama = ["colorama (>=0.4.3)"]
@ -548,63 +549,63 @@ textsearch = ">=0.0.21"
[[package]]
name = "coverage"
version = "7.0.4"
version = "7.0.5"
description = "Code coverage measurement for Python"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
{file = "coverage-7.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:daf91db39324e9939a9db919ee4fb42a1a23634a056616dae891a030e89f87ba"},
{file = "coverage-7.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:55121fe140d7e42cb970999b93cf1c2b24484ce028b32bbd00238bb25c13e34a"},
{file = "coverage-7.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c027fbb83a8c78a6e06a0302ea1799fdb70e5cda9845a5e000545b8e2b47ea39"},
{file = "coverage-7.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:caf82db5b7f16b51ec32fe0bd2da0805b177c807aa8bfb478c7e6f893418c284"},
{file = "coverage-7.0.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ba5cc54baf3c322c4388de2a43cc95f7809366f0600e743e5aae8ea9d1038b2"},
{file = "coverage-7.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:260854160083f8275a9d9d49a05ab0ffc7a1f08f2ccccbfaec94a18aae9f407c"},
{file = "coverage-7.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ea45f0dba5a993e93b158f1a9dcfff2770e3bcabf2b80dbe7aa15dce0bcb3bf3"},
{file = "coverage-7.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6abc91f6f8b3cc0ae1034e2c03f38769fba1952ab70d0b26953aa01691265c39"},
{file = "coverage-7.0.4-cp310-cp310-win32.whl", hash = "sha256:053cdc47cae08257051d7e934a0de4d095b60eb8a3024fa9f1b2322fa1547137"},
{file = "coverage-7.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:1e9e94f2612ee549a4b3ee79cbc61bceed77e69cf38cfa05858bae939a886d16"},
{file = "coverage-7.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5caa9dd91dcc5f054350dc57a02e053d79633907b9ccffff999568d13dcd19f8"},
{file = "coverage-7.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:efc200fa75d9634525b40babc7a16342bd21c101db1a58ef84dc14f4bf6ac0fd"},
{file = "coverage-7.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1791e5f74c5b52f76e83fe9f4bb9571cf76d40ee0c51952ee1e4ee935b7e98b9"},
{file = "coverage-7.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3d9201cfa5a98652b9cef36ab202f17fe3ea83f497b4ba2a8ed39399dfb8fcd4"},
{file = "coverage-7.0.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22d8ef6865cb6834cab2b72fff20747a55c714b57b675f7e11c9624fe4f7cb45"},
{file = "coverage-7.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b84076e3de192fba0f95e279ac017b64c7c6ecd4f09f36f13420f5bed898a9c7"},
{file = "coverage-7.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:dcfbf8ffc046f20d75fd775a92c378f6fc7b9bded6c6f2ab88b6b9cb5805a184"},
{file = "coverage-7.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4665a714af31f160403c2e448fb2fef330719d2e04e836b08d60d612707c1041"},
{file = "coverage-7.0.4-cp311-cp311-win32.whl", hash = "sha256:2e59aef3fba5758059208c9eff10ae7ded3629e797972746ec33b56844f69411"},
{file = "coverage-7.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:2b854f7985b48122b6fe346631e86d67b63293f8255cb59a93d79e3d9f1574e3"},
{file = "coverage-7.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e44b60b0b49aa85d548d392a2dca2c6a581cd4084e72e9e16bd58bd86ec20816"},
{file = "coverage-7.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2904d7a0388911c61e7e3beefe48c29dfccaba938fc1158f63190101a21e04c2"},
{file = "coverage-7.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bc74b64bfa89e2f862ea45dd6ac1def371d7cc883b76680d20bdd61a6f3daa20"},
{file = "coverage-7.0.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c06046f54e719da21c79f98ecc0962581d1aee0b3798dc6b12b1217da8bf93f4"},
{file = "coverage-7.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:bc9c77004970a364a1e5454cf7cb884e4277592b959c287689b2a0fd027ef552"},
{file = "coverage-7.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:0815a09b32384e8ff00a5939ec9cd10efce8742347e019c2daca1a32f5ac2aae"},
{file = "coverage-7.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a78a80d131c067d67d8a6f9bd3d3f7ea7eac82c1c7259f97d7ab73f723da9d55"},
{file = "coverage-7.0.4-cp37-cp37m-win32.whl", hash = "sha256:2b5936b624fbe711ed02dfd86edd678822e5ee68da02b6d231e5c01090b64590"},
{file = "coverage-7.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:a63922765ee49d5b4c32afb2cd5516812c8665f3b78e64a0dd005bdfabf991b1"},
{file = "coverage-7.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d68f2f7bddb3acdd3b36ef7f334b9d14f30b93e094f808fbbd8d288b8f9e2f9b"},
{file = "coverage-7.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9dafdba3b2b9010abab08cb8c0dc6549bfca6e1630fe14d47b01dca00d39e694"},
{file = "coverage-7.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0322354757b47640535daabd2d56384ff3cad2896248fc84d328c5fad4922d5c"},
{file = "coverage-7.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e8267466662aff93d66fa72b9591d02122dfc8a729b0a43dd70e0fb07ed9b37"},
{file = "coverage-7.0.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f684d88eb4924ed0630cf488fd5606e334c6835594bb5fe36b50a509b10383ed"},
{file = "coverage-7.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:70c294bb15ba576fb96b580db35895bf03749d683df044212b74e938a7f6821f"},
{file = "coverage-7.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:34c0457e1ba450ae8b22dc8ea2fd36ada1010af61291e4c96963cd9d9633366f"},
{file = "coverage-7.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b75aff2c35ceaa299691e772f7bf7c8aeab25f46acea2be3dd04cccb914a9860"},
{file = "coverage-7.0.4-cp38-cp38-win32.whl", hash = "sha256:6c5554d55668381e131577f20e8f620d4882b04ad558f7e7f3f1f55b3124c379"},
{file = "coverage-7.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:c82f34fafaf5bc05d222fcf84423d6e156432ca35ca78672d4affd0c09c6ef6c"},
{file = "coverage-7.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b8dfb5fed540f77e814bf4ec79619c241af6b4578fa1093c5e3389bbb7beab3f"},
{file = "coverage-7.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee32a080bab779b71c4d09a3eb5254bfca43ee88828a683dab27dfe8f582516e"},
{file = "coverage-7.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dfbee0bf0d633be3a2ab068f5a5731a70adf147d0ba17d9f9932b46c7c5782b"},
{file = "coverage-7.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32dc010713455ac0fe2fddb0e48aa43875cc7eb7b09768df10bad8ce45f9c430"},
{file = "coverage-7.0.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9cb88a3019ad042eaa69fc7639ef077793fedbf313e89207aa82fefe92c97ebd"},
{file = "coverage-7.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:73bc6114aab7753ca784f87bcd3b7613bc797aa255b5bca45e5654070ae9acfb"},
{file = "coverage-7.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:92f135d370fcd7a6fb9659fa2eb716dd2ca364719cbb1756f74d90a221bca1a7"},
{file = "coverage-7.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f3d485e6ec6e09857bf2115ece572d666b7c498377d4c70e66bb06c63ed177c2"},
{file = "coverage-7.0.4-cp39-cp39-win32.whl", hash = "sha256:c58921fcd9914b56444292e7546fe183d079db99528142c809549ddeaeacd8e9"},
{file = "coverage-7.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:f092d9f2ddaa30235d33335fbdb61eb8f3657af519ef5f9dd6bdae65272def11"},
{file = "coverage-7.0.4-pp37.pp38.pp39-none-any.whl", hash = "sha256:cb8cfa3bf3a9f18211279458917fef5edeb5e1fdebe2ea8b11969ec2ebe48884"},
{file = "coverage-7.0.4.tar.gz", hash = "sha256:f6c4ad409a0caf7e2e12e203348b1a9b19c514e7d078520973147bf2d3dcbc6f"},
{file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
{file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
{file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
{file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
{file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
{file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
{file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
{file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
{file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
{file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
{file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
{file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
{file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
{file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
{file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
{file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
{file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
{file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
{file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
{file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
{file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
{file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
{file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
{file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
{file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
{file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
{file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
{file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
{file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
{file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
{file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
{file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
{file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
{file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
{file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
{file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
{file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
{file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
{file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
{file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
{file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
{file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
{file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
{file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
{file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
{file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
{file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
{file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
{file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
{file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
{file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
]
[package.dependencies]
@ -1331,6 +1332,9 @@ files = [
{file = "Markdown-3.3.7.tar.gz", hash = "sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874"},
]
[package.dependencies]
importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""}
[package.extras]
testing = ["coverage", "pyyaml"]
@ -1424,6 +1428,7 @@ files = [
click = ">=7.0"
colorama = {version = ">=0.4", markers = "platform_system == \"Windows\""}
ghp-import = ">=1.0"
importlib-metadata = {version = ">=4.3", markers = "python_version < \"3.10\""}
jinja2 = ">=2.11.1"
markdown = ">=3.2.1,<3.4"
mergedeep = ">=1.3.4"
@ -1883,6 +1888,7 @@ files = [
[package.dependencies]
numpy = [
{version = ">=1.20.3", markers = "python_version < \"3.10\""},
{version = ">=1.21.0", markers = "python_version >= \"3.10\""},
{version = ">=1.23.2", markers = "python_version >= \"3.11\""},
]
@ -1947,13 +1953,6 @@ category = "main"
optional = false
python-versions = ">=3.7"
files = [
{file = "Pillow-9.4.0-1-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1b4b4e9dda4f4e4c4e6896f93e84a8f0bcca3b059de9ddf67dac3c334b1195e1"},
{file = "Pillow-9.4.0-1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:fb5c1ad6bad98c57482236a21bf985ab0ef42bd51f7ad4e4538e89a997624e12"},
{file = "Pillow-9.4.0-1-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:f0caf4a5dcf610d96c3bd32932bfac8aee61c96e60481c2a0ea58da435e25acd"},
{file = "Pillow-9.4.0-1-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:3f4cc516e0b264c8d4ccd6b6cbc69a07c6d582d8337df79be1e15a5056b258c9"},
{file = "Pillow-9.4.0-1-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b8c2f6eb0df979ee99433d8b3f6d193d9590f735cf12274c108bd954e30ca858"},
{file = "Pillow-9.4.0-1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b70756ec9417c34e097f987b4d8c510975216ad26ba6e57ccb53bc758f490dab"},
{file = "Pillow-9.4.0-1-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:43521ce2c4b865d385e78579a082b6ad1166ebed2b1a2293c3be1d68dd7ca3b9"},
{file = "Pillow-9.4.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:2968c58feca624bb6c8502f9564dd187d0e1389964898f5e9e1fbc8533169157"},
{file = "Pillow-9.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c5c1362c14aee73f50143d74389b2c158707b4abce2cb055b7ad37ce60738d47"},
{file = "Pillow-9.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd752c5ff1b4a870b7661234694f24b1d2b9076b8bf337321a814c612665f343"},
@ -2298,14 +2297,14 @@ email = ["email-validator (>=1.0.3)"]
[[package]]
name = "pydocstyle"
version = "6.2.3"
version = "6.3.0"
description = "Python docstring style checker"
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
{file = "pydocstyle-6.2.3-py3-none-any.whl", hash = "sha256:a04ed1e6fe0be0970eddbb1681a7ab59b11eb92729fdb4b9b24f0eb11a25629e"},
{file = "pydocstyle-6.2.3.tar.gz", hash = "sha256:d867acad25e48471f2ad8a40ef9813125e954ad675202245ca836cb6e28b2297"},
{file = "pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019"},
{file = "pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1"},
]
[package.dependencies]
@ -2353,6 +2352,7 @@ mccabe = ">=0.6,<0.8"
platformdirs = ">=2.2.0"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
tomlkit = ">=0.10.1"
typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""}
[package.extras]
spelling = ["pyenchant (>=3.2,<4.0)"]
@ -3400,14 +3400,11 @@ files = [
{file = "tokenizers-0.13.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47ef745dbf9f49281e900e9e72915356d69de3a4e4d8a475bda26bfdb5047736"},
{file = "tokenizers-0.13.2-cp310-cp310-win32.whl", hash = "sha256:96cedf83864bcc15a3ffd088a6f81a8a8f55b8b188eabd7a7f2a4469477036df"},
{file = "tokenizers-0.13.2-cp310-cp310-win_amd64.whl", hash = "sha256:eda77de40a0262690c666134baf19ec5c4f5b8bde213055911d9f5a718c506e1"},
{file = "tokenizers-0.13.2-cp311-cp311-macosx_10_11_universal2.whl", hash = "sha256:9eee037bb5aa14daeb56b4c39956164b2bebbe6ab4ca7779d88aa16b79bd4e17"},
{file = "tokenizers-0.13.2-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:d1b079c4c9332048fec4cb9c2055c2373c74fbb336716a5524c9a720206d787e"},
{file = "tokenizers-0.13.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a689654fc745135cce4eea3b15e29c372c3e0b01717c6978b563de5c38af9811"},
{file = "tokenizers-0.13.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3606528c07cda0566cff6cbfbda2b167f923661be595feac95701ffcdcbdbb21"},
{file = "tokenizers-0.13.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:41291d0160946084cbd53c8ec3d029df3dc2af2673d46b25ff1a7f31a9d55d51"},
{file = "tokenizers-0.13.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7892325f9ca1cc5fca0333d5bfd96a19044ce9b092ce2df625652109a3de16b8"},
{file = "tokenizers-0.13.2-cp311-cp311-win32.whl", hash = "sha256:93714958d4ebe5362d3de7a6bd73dc86c36b5af5941ebef6c325ac900fa58865"},
{file = "tokenizers-0.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:fa7ef7ee380b1f49211bbcfac8a006b1a3fa2fa4c7f4ee134ae384eb4ea5e453"},
{file = "tokenizers-0.13.2-cp37-cp37m-macosx_10_11_x86_64.whl", hash = "sha256:da521bfa94df6a08a6254bb8214ea04854bb9044d61063ae2529361688b5440a"},
{file = "tokenizers-0.13.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a739d4d973d422e1073989769723f3b6ad8b11e59e635a63de99aea4b2208188"},
{file = "tokenizers-0.13.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cac01fc0b868e4d0a3aa7c5c53396da0a0a63136e81475d32fcf5c348fcb2866"},
@ -4245,5 +4242,5 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "9806eb5cda72781cf469399845cadac506027c86eeb182901aa9a8a0596d998c"
python-versions = "^3.9"
content-hash = "5aeb0b1e22a4d0f5a7fe7c72dd0ef63f7bf7b7395a11f46503cf6340d0d34d7a"

View File

@ -31,7 +31,7 @@ classifiers = [
"internet-ml" = "internet_ml.__main__:app"
[tool.poetry.dependencies]
python = "^3.10"
python = "^3.9"
typer = {extras = ["all"], version = "^0.4.0"}
rich = ">=10.14,<14.0"
tokenizers = "^0.13.2"