Three Autodesk Community Events Week of December 5th 2022 and One December 15th
Learn About the Autodesk AI Lab

Interesting AI Possibilities from OpenAI Using ChatGPT

Last Wednesday, OpenAI released their ChatGPT for free and is based on GPT-3.5.
https://openai.com/blog/chatgpt/ 

ChatGPT is like a smarter search engine as a bot with the ability to create results including code or text in response to natural language queries. What I find interesting and the possibilities exciting as well as spooky is the ability to not only get really interesting returns to text questions but also write code including Autodesk product customization like ObjectARX, Lisp, Forge, Dynamo, or mel for Maya and Maxscript for 3ds Max. simply by asking the ChatGPT.

”ChatGPT: Optimizing Language Models for Dialogue

We’ve trained a model called ChatGPT which interacts in a conversational way. The dialogue format makes it possible for ChatGPT to answer follow-up questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests. ChatGPT is a sibling model to InstructGPT, which is trained to follow an instruction in a prompt and provide a detailed response.”

ChatGPT https://chat.openai.com/chat


ChatGPT


Examples

Question: Explain Quantum Physics to a 10 year old child:
Answer from ChatGPT:
image


Question: Write a short haiku about Autodesk
Answer from ChatGPT:
”Designs in digital form
Creations of the mind come alive
Autodesk at work.”

Question: Write ObjectARX to have AutoCAD select the center of a rectangle.
Answer from ChatGPT:

image


Question: Create Mel script to change the texture of all objects to a singled texture in Autodesk Maya.
Answer from ChatGPT:
”This script first defines the path to the texture file that you want to use. It then gets a list of all objects in the scene and loops through each object. For each object, it gets the shading group and material connected to the object, and then creates a file texture node and connects it to the material's color attribute. Finally, it sets the file texture's path to the texture file that you specified.”
image

Question: Display an Autodesk Revit file in Autodesk Forge Viewer
Answer from ChatGPT:
”To display an Autodesk Revit file in the Autodesk Forge Viewer, you will need to use the Forge Viewer API. The Forge Viewer is a web-based 3D model viewer that allows you to view and interact with 3D models in your web browser. It is built on top of the Forge APIs and services, and provides a set of tools and features that make it easy to integrate 3D model viewing functionality into your web applications.

To display a Revit file in the Forge Viewer, you will need to first upload the Revit file to the Forge server. You can do this using the Forge Data Management API, which allows you to upload and download files to and from the Forge server. Once the file is uploaded, you can use the Forge Viewer API to display the model in your web page.

Here is a simple example of how you can use the Forge Viewer API to display a Revit file in your web page:”
image
”This code first sets the Forge client ID and secret, which you will need to obtain from the Forge developer portal. It then sets the path to the Revit file that you want to display, and initializes the Forge Viewer. Next, it sets the Forge authentication options and authenticates with Forge using the Autodesk.Viewing.Initializer() method. Once the authentication is successful, it uses the Autodesk.Viewing.Document.load() method to extract the source references from the Revit file. It then loads the Revit file and its source references using the viewer.load()”

Pretty interest and you can also ask for the sources of the code if it is using code examples from elsewhere. While the code isn't always 100% correct or optimized, or text answers 100% correct, it is promising on more intelligent bot answers to questions.


Warning: Keep in mind programming languages will require knowledge of the code ChatGPT produces to assure it is valid or optimal and in some cases the api it creates is actually real.

ChatGPT is pretty amazing for a new technology, but it has some rough edges but it sure is fun to create lyrics, poems, haiku, and stories.

I am seeing problems today due to the overwhelming interest and ChatGPT going viral.
 
-Shaan

Comments