This is an API request made in Python that allows you to chat with ChatGPT together.
(These steps will set it up on your Wi-Fi.)
Get an API key from https://platform.openai.com/account/api-keys.
Paste the API key in the openai.api_key variable on the server. (openai.api_key = 'your key')
Open the console and type in ipconfig.
Get the IPv4 address and paste it in the host variable. (host = 'Your IP')
Paste the host variable from the server into client.connect(('Host variable', 55555)) in the client.py file. (client.connect(('Host variable', 55555)))
Open the console and type in ipconfig.
Go to your router page by typing the default gateway from the ipconfig output into any browser.
Log in to the admin page (Usually the password is admin, password, or there are instructions on that page).
Set up a public port on your IP with 55555 as the port.
In the client, put your public IP (You can find it on https://whatismyipaddress.com/ and remember to turn off your VPN if you are using one).
Note: Do not share the client.py publicly; only share it with people you trust or use a domain to avoid unauthorized access.