mapluisch / ChatGPT-without-login

Scripts in various languages to use ChatGPT without login, registration, or API access.
MIT License
28 stars 4 forks source link

code run endless #5

Closed thangckt closed 1 week ago

thangckt commented 2 weeks ago

hi @mapluisch

I tried to run this code in jupyter

import asyncio
from .gpt import GPT

async def run_session():
    # create gpt instance & send initial prompt
    session = GPT(prompt="Tell me a joke.", streaming=False)
    await session.start()
    await session.close()

asyncio.run(run_session())

The code work normal, and i can get text return from chatgpt. But, after the browser is closed, the code does not stop.

Can you check it. Thank.