aandrew-me / tgpt

AI Chatbots in terminal without needing API keys
GNU General Public License v3.0
2k stars 169 forks source link

Can you use Python to write a simple request for topic #30

Closed yybjy closed 1 year ago

yybjy commented 1 year ago

i don't konw why i use python couldn't pass: url="https://chatbot.theb.ai/api/chat-process"

headers = { 'Content-Length':'93', 'authority':'chatbot.theb.ai', 'Content-Type':'application/json', "Referer": "https://chatbot.theb.ai/", "accept": "application/json, text/plain, /", 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', 'Cookie':'_ga='' } data={ "prompt":"who are you", "options":{"parentMessageId":"chatcmpl-7Ez7G8eRMBVroyBc7AWxcvr7lzq2U"} } data1=json.dumps(data) resp= requests.post(url,headers=headers,data=data1,timeout=100000) print(resp) resp.raise_for_status() print(resp.status_code, resp.text)

aandrew-me commented 1 year ago

This is because of TLS Fingerprinting

aandrew-me commented 1 year ago

This is not the place to talk about your issues, if you want, message me on any of those