This project sets out to find a way to leverage the power of ChatGPT to create Grasshopper definitions. It was developed at the AEC Tech Seattle Hackathon 2023 hosted by Thornton Tomasetti CORE studio and LMN
- Callum Sykes - StructureCraft
- Jo Kamm - Dimensional Innovations
- Sergey Pigach - Thornton Tomasetti
- Ryan Erbert
- Quoc Dang
Your options for installing GHPT are as follows:
- Install the plug-in from Food4Rhino.
- Install the GHPT Yak package from Rhino's Package Manager.
- Build from source.
Once GhPT is downloaded and installed, the OpenAI token key needs to be set up through the pop-up Token Configuration Window. To use the OpenAI API, you need to provide an API key and specify a GPT model.
You can sign up for OpenAI API on this page. Once you signed up and logged in, open this page and select Create new secret key. You can then copy the key by clicking on the green text Copy, make sure to save this key somewhere else as you will not be able to access it again.
Select your model from the dropdown menu
Paste the key in the GPT Token box.
Go to this page to check for your access to different GPT models (currently we are using the more advanced model GPT-4 that has limited access) but model GPT-3.5 should also work well.
Creating a component and initiating a request to the ChatGPT API can be accomplished via shortcut; Prompts can be written directly into the grasshopper component search function.
To take advantage of this functionality, double click an empty space on the canvas and type a prompt in the following format:
GHPT = <your prompt goes here>
After allowing the module some time to think, an organized node graph will appear. Additionally, an "Advice" text panel will be create to display advice/feedback from GPT.
In the event that a prompt is too complex, the module will display an error message.
Prompt guide - add these text snippet at the end of your request for more specific instructions to GPT
- "if there are questions, put them in the Advice section" -> if your prompt is too complex for GPT, this allow GPT to ask for clarification
- "prefer Circle over Circle CNR" -> instruct GPT to prefer a component over another one with similar name/function
- "be specific" -> more clarified