diff options
author | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-22 14:22:33 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-22 14:22:33 +0200 |
commit | 63cda8d779f9aaccbdac7cea39f496eca44a96ad (patch) | |
tree | ac5c86980c7386af9473975e4c0fa70edd4caefb /g4f/Provider/deprecated/Myshell.py | |
parent | Enable Liaobots and ChatForAi again (diff) | |
download | gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.tar gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.tar.gz gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.tar.bz2 gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.tar.lz gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.tar.xz gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.tar.zst gpt4free-63cda8d779f9aaccbdac7cea39f496eca44a96ad.zip |
Diffstat (limited to 'g4f/Provider/deprecated/Myshell.py')
-rw-r--r-- | g4f/Provider/deprecated/Myshell.py | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/g4f/Provider/deprecated/Myshell.py b/g4f/Provider/deprecated/Myshell.py index b1aa2b2d..85731325 100644 --- a/g4f/Provider/deprecated/Myshell.py +++ b/g4f/Provider/deprecated/Myshell.py @@ -174,46 +174,4 @@ def generate_visitor_id(user_agent: str) -> str: r = hex(int(random.random() * (16**16)))[2:-2] d = xor_hash(user_agent) e = hex(1080 * 1920)[2:] - return f"{f}-{r}-{d}-{e}-{f}" - - - -# update -# from g4f.requests import StreamSession - -# async def main(): -# headers = { -# 'authority': 'api.myshell.ai', -# 'accept': 'application/json', -# 'accept-language': 'en,fr-FR;q=0.9,fr;q=0.8,es-ES;q=0.7,es;q=0.6,en-US;q=0.5,am;q=0.4,de;q=0.3', -# 'content-type': 'application/json', -# 'myshell-service-name': 'organics-api', -# 'origin': 'https://app.myshell.ai', -# 'referer': 'https://app.myshell.ai/', -# 'sec-ch-ua': '"Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99"', -# 'sec-ch-ua-mobile': '?0', -# 'sec-ch-ua-platform': '"macOS"', -# 'sec-fetch-dest': 'empty', -# 'sec-fetch-mode': 'cors', -# 'sec-fetch-site': 'same-site', -# 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36', -# 'visitor-id': '18ae8fe5d916d3-0213f29594b17f-18525634-157188-18ae8fe5d916d3', -# } - -# json_data = { -# 'conversation_scenario': 3, -# 'botId': '4738', -# 'message': 'hi', -# 'messageType': 1, -# } - -# async with StreamSession(headers=headers, impersonate="chrome110") as session: -# async with session.post(f'https://api.myshell.ai/v1/bot/chat/send_message', -# json=json_data) as response: - -# response.raise_for_status() -# async for chunk in response.iter_content(): -# print(chunk.decode("utf-8")) - -# import asyncio -# asyncio.run(main())
\ No newline at end of file + return f"{f}-{r}-{d}-{e}-{f}"
\ No newline at end of file |