Skip to content
forked from enmerk4r/GHPT

GHPT is a Grasshopper plugin takes a prompt and uses ChatGPT to generate a GH script

License

Notifications You must be signed in to change notification settings

pierreembacher/GHPT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GHPT

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

0 1 4_README

Team

Installation

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.

Token Configuration

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. 0 1 4_README_API

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. image

Select your model from the dropdown menu

image

Paste the key in the GPT Token box.

image

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. gpt model

How to use

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.

image

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

About

GHPT is a Grasshopper plugin takes a prompt and uses ChatGPT to generate a GH script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%