Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.61k stars 44.09k forks source link

free gpt3.5 api #4459

Closed Kolhax closed 1 year ago

Kolhax commented 1 year ago

Hi my name is Kepar, recently i found a chatgpt clone (3.5 turbo) model for free

i leave the code here, tell me if something happens with this, hope i helped the world

import json
import requests

safeInput = input('Request:  ')

# Prepare the data payload
data = {
    "prompt": safeInput
}
payload = json.dumps(data)

# Set the headers
headers = {
    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "en-US,en;q=0.5",
    "Content-Type": "application/json",
    "Origin": "https://chatbot.theb.ai",
    "Referer": "https://chatbot.theb.ai/"
}

# Send the POST request
url = "https://chatbot.theb.ai/api/chat-process"
response = requests.post(url, data=payload, headers=headers)

# Process the response
if response.status_code == 200:
    response_text = response.text

    # Find the last JSON string in the response text
    json_strings = response_text.strip().split('\n')
    last_json_string = json_strings[-1]

    response_json = json.loads(last_json_string)
    print(response_json['text'])
else:
    print("Error:", response.status_code)
lc0rp commented 1 year ago

This is best for a plugin. Do you want to create a plugin for this? https://github.com/Significant-Gravitas/Nexus/wiki/Plugins

shikoshib commented 1 year ago

gone today :(

muhiris commented 1 year ago

This key is now gone and is not working now. Their was a CLI tool for it too. RIP to this wonderful key :(

npm i -g wgpt

and then

wgpt hello their