Hi there, I'm AleksFolt
This is not the official library for the gigachat.ru messenger. We are not responsible for this project for all your actions you are responsible if you use this library
- Go to gigachat.ru
- Register or log in to your existing account
- Open developer console: F12 or Ctrl + Shift + C
- Application → Cookies → https://gigachat.ru → Copy the value of
PHPSESSIDcookie.
$ pip install gigathon-api==0.0.1
Import:
from gigachat-api import GigaChat import asyncio api_token = "your_token" client = GigaChat(api_token, "leave it like that")
Usage:
async def main():
last = None
while True:
messages = await client.get_messages(last=last)
for message in messages:
last = message
if message[1] != last:
if not message[1]:
continue
prompt = message[1][1]
if prompt == "":
continue
response = prompt
await client.send_message(response, message[0])
and:
if __name__ == "__main__":
asyncio.run(main())
Created a library and did all the routine: Alekami649
Deployed to pypi, made a repository on github and came up with an idea (or maybe not): AleksFolt