EZRX is a plug-in for Rhino that helps a user use Chat GPT to create scripted Grasshopper nodes. We built this for the AEC Tech 2023 Hackathon in New York hosted by CORE studio and Thornton Thomasetti.
Architects don't have time or motivation to learn to code, but would benefit from using scripts for creating reproducible workflows and more complex forms.
Today an architect can use Chat GPT to request code, but someone without programming experience can find it hard to get Chat GPT to produce working code. They need to provide sufficient context with the prompt to get a working result.
A lot of our time was spent as a group trying to understand narrow down our original mandate of "making coding easier". We wanted to understand what that meant exactly, how we might achieve that, which persona we wanted to focus on and what use case we were targetting.
Once we arrived at the we designed and coded three primary components:
- A tool for generating grasshopper nodes that dynamically compile and execute arbitrary C# code read from a file
- An API for sending prompts to and reading responses of the Chat GPT API, with additional context provided to prompt to produce better code
- A UI to allow the user to provide a prompt and review the generated code, before generating a node from it
- Rhino API - For creating Grasshopper nodes
- Roslyn SDK - C# Compiler
- Ara3D Library - utility library and convenience functions
- OpenAI Unoffical .NET API
This module used the github.com\ara3d\ara3d
project as a submodule.
From the command-line you can pull the submodules using:
git submodule update --init --recursive
We only had time to get the code running on one user's machine and unfortunately do not have the steps documented to run the system.
- Don't post API keys to Github
- If you accidentally post your OpenAPI API key to Github, OpenAPI will revoke it very quickly!
- Don't ask too much from your prompt or it can get confused
- Chat GPT 4 is much more powerful than GPT 3.5 and can handle more complex requests
- Getting working code requires providing a lot of additional context
- We found that the unofficial OpenAPI .NET worked better than the official one.
- How you phrase a prompt makes a big difference
- ChatGPT will not always produce the same results.
- Architects don't necessarily want to learn to code, they want to realize their designs quicker
We only had 26 hours to write the code and submit the presentation so there is a lot left to do.
- Test the system on other person's machine
- Refactor the code to make it easier to run and modify
- Create an installer
- Document the build process
- Storing prompts and the results and making them searchable
- Supporting different output types other than just mesh
- Allowing customized inputs
- Allow the prompt contexts to be updated by the user
- Allow the generated code to be used in other context
- Train models to create and recognize a generic structure for describing inputs/outputs
We are the EZ Script team.
- Christopher Diggins - Software Developer
- Emma Xu - Architecture Student
- Travis Potter - Software Engineer and MEP Engineer
- Haki Sallaku - Computer Science Student
- Sun Lee - Computational Designer and Architect
- Bell Wang - Architecture Student
- Marcelo Villalba - Software Engineer