Closed mamun3600 closed 1 year ago
I wish to run the script in headless mode from my PC. what should I do?
I run the below codes and It's working fine on my end but I do not want to open the browser every time.
from pyChatGPT import ChatGPT
session_token = 'abc123' # __Secure-next-auth.session-token cookie from https://chat.openai.com/chat api = ChatGPT(session_token) # auth with session token
__Secure-next-auth.session-token
resp = api.send_message('Hello, world!') print(resp['message'])
You can't run this headless. Headless browser cannot bypass Cloudflare protection.
I wish to run the script in headless mode from my PC. what should I do?
I run the below codes and It's working fine on my end but I do not want to open the browser every time.
from pyChatGPT import ChatGPT
session_token = 'abc123' #
__Secure-next-auth.session-token
cookie from https://chat.openai.com/chat api = ChatGPT(session_token) # auth with session tokenresp = api.send_message('Hello, world!') print(resp['message'])