Skip to content

Instantly share code, notes, and snippets.

View monsieurpablo's full-sized avatar

Pablo Arango monsieurpablo

  • Hoare Lea
  • London, UK
View GitHub Profile
*anydesk.com
*anydesk*
@monsieurpablo
monsieurpablo / openAI_ChatGPT3.py
Created January 18, 2023 17:45
Integrate open AI API using Iron Python (Can be used inside Grasshopper3D)
import urllib2
import json
# Set the endpoint URL and the prompt text
url = "https://api.openai.com/v1/completions"
# Set the API key and other parameters
data = json.dumps({ "model": "text-davinci-003", "prompt": prompt, "temperature": 0.5, "max_tokens": 1024})
headers = { "Content-Type": "application/json", "Authorization": "Bearer {0}".format(api_key) }
// Update to version 1
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,