Sheel Sansare - Part 2

Introducing “RevitGPT”

A natural language based Revit assistant to simplify design changes to your Revit components. Forget the hundreds of buttons and features in Revit - simply ask the AI to change your model and see the results.

image

The basic logic for this tool revolves around the OpenAI API (Dyn OpenAI Package). It uses the power of large language models like GPT3.5 to take an input string and return an output. I use the LLM to extract the parameter name and number from the question/query. For example, if the query is “change the height to 100ft”, I use the LLM to extract the parameter name “Building Height” and the number “100”. I do this by prompting the LLM with the following prompts:

  • Based on the following question, determine which of these parameters the question is talking about. Respond with one of the following: Building Top Width, Building Top Depth, Building Base Width, Building Base Depth, Building Height, Twist. Question:
  • Based on the following question, extract the number in the question. Respond with only the number. Question:

This is able to return the requested values, and then I change the parameter value with the Element.SetParameterByName node.

All you need for this tool to work is a Revit component to select, an OpenAI API key, and a question. For the video example I used a parametric twisting rectangular mass.

image

For future development I would make this tool more generalizable because right now it works with a known list of parameter names. Ideally the tool would work for any set of parameter names and for any type of components/models.