Created
December 19, 2022 20:56
-
-
Save jgabriellima/d500cbe0c4311431956b7035d401b648 to your computer and use it in GitHub Desktop.
Request OpenAI through code-reviewer.vercel.app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
cookies = { | |
'locale': 'en', | |
} | |
headers = { | |
'authority': 'code-reviewer.vercel.app', | |
'accept': 'application/json, text/plain, */*', | |
'accept-language': 'en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7', | |
'cache-control': 'no-cache', | |
'content-type': 'application/json', | |
# 'cookie': 'locale=en', | |
'origin': 'https://code-reviewer.vercel.app', | |
'pragma': 'no-cache', | |
'referer': 'https://code-reviewer.vercel.app/?ref=producthunt', | |
'sec-ch-ua': '"Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"', | |
'sec-ch-ua-mobile': '?0', | |
'sec-ch-ua-platform': '"macOS"', | |
'sec-fetch-dest': 'empty', | |
'sec-fetch-mode': 'cors', | |
'sec-fetch-site': 'same-origin', | |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36', | |
} | |
json_data = { | |
'code': 'VCC_TRANSACTION_SCHEMA = { "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "additionalProperties": False, "properties": { "application_id": { "type": "number", "format": "intege" }, "transaction_id": { "type": "string", "format": "string", "minLength": 1 }, "capture_date": { "type": "string", "format": "date-time" }, "capture_amount": { "type": "number", "format": "integer", "minimum": 0, }, "type": { "type": "string", "enum": ["sale", "refund"], "minLength": 1 } }, "required": [ "application_id", "capture_amount", "capture_date", "transaction_id", "type" ],}', | |
} | |
response = requests.post('https://code-reviewer.vercel.app/api/openai', cookies=cookies, headers=headers, json=json_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment