Dyn Open AI - Bringing OpenAI/ ChatGPT to Dynamo

So what have you actually scripted with it?

So far I have only set up the Chat GPT interface in dynamo to provide Responses and display in dynamo player. Assuming this work like the Playground i hope to be able to set different version of the Bot with selected preset prompts to provide responses based on the presets

My first approach to use the GPT AI. not to Code Python like Many, but to use the chat GPTBot as an assistant for Building Code and mathematical formula.

I want to to setup some ParaMeters and add text input to the box prior to analyzing the question. Usually in the Chat GPT it takes me about a 12 setup questions to direct the bot into the subject and refine the responses.

  1. During the design and modeling process i want quiery Chat GPT for NFP13, AISC, OSHPD, AWS, ADA , CBC, IBC codes for easy references. I want chat GPT to output section numbers and data found in the different building codes.

  2. Goal number 2 to use the bot interface for Mathematical issues. Friction loss formula, triangulation, unit conversion, etc.

  3. Feed a PDF such as architectural specification and have the AI respond to questions regarding the Specs. “What is the finish for structural steel members referenced in this pdf document?” “Summarize the changes listed in this document?”

Sadly the GPT models seem to be limited to the 2.0 version on package and the responses are not as good as the latest GPT3 responses when testing Chat GPT.

I was about to post my .Dyn but, i realized it has my API key.

2 Likes

Thank you for sharing your experience with using the Chat GPT interface in Dynamo, and for conducting thorough testing. Your approach to using the package as an assistant for building code and mathematical formulas is fascinating.

While I am almost certain that when I developed this package, the API had no access to the GPT-3 Models, I just checked again and am glad to inform you that GPT-3 models are now available for use with the OpenAI API. I will be upgrading the package to include them as soon as possible.

I understand your concern about sharing your API key. However, I believe it can be done in a secure manner. One approach would be to set the graph to run manually, and after a successful run, remove the API-Key and export the graph to png. Alternatively, you could take a screenshot and blur it later. This would be helpful if you want to seek help with your graph or simply share it.

About feeding it a whole specification. well, there is a chance that this specification you are targeting may be in the model training materials so u may try ur luck and ask your question directly first, then u may use dynamo text file reader nodes (i.e; this) and extract a text from .pdf, or .txt file then pass the whole string to the model after adding your question, but u may face problems with max token size tho, give it a try n tell us what u ended up with?

Also, please note that the API and playground cannot keep track of the conversation, as explained here How to keep the conversation going with OpenAI API PHP sdk - Stack Overflow.

Your reply has made me consider making the package open-source. I believe that this would benefit the entire community by allowing everyone to contribute to its development. I will post a GitHub link here soon.

Thank you once again for your valuable feedback.

3 Likes

Hey question can this package also connect nodes or just write code blocks and python nodes? How does this work? Could it also check my lacing for instance? I would love to use the AI as my sidekick to maintain focus and do ‘spellcheck’

It doesn’t have the ability to connect nodes or manage lacing, it can certainly assist you in thinking through your ideas and suggest ways to optimize your workflow. Think of it as a powerful tool that can act as your sidekick and help you maintain focus while you work. Hope that helps!

Let me / us know when you make the package open source. Would be great to test it further

The package has been recently updated to version 1.1.0. I have added a comprehensive help/documentation file and extended the support for davinci-003 GPT3 Model.
Moreover, I have made the package available on both the Package Manager and Github, ensuring that the source code is easily accessible to everyone.

1 Like

help please i got this message

I tried it with these settings and no errors happened, share the error message, please.

It may be because ChatGPT is at capacity right now, so u should try again after a while or check their website.

could you please share your scripts to test in revit 2023

is there anyone who tried creating/successfully created a family with this?

Hello,
I tested it on Civil 3D but doesn’t work ! is there any solution please ?

I tried but it didn’t work,it’s hard to get access to chatGPT from China,always returned message “Access denied”
With the helpl of my classmates I managed to use it and found it not as perfect as the report say.If I ask complex questions the scripts it generates doesn’t work.But from simple task and with a little modification,it works totally fine.I think it would be a great tool in the future.I’m not at using python to get access to Revit API ,but I know basics.I think chatGPT can do a lot work for me when it becomes more intelligent and powerful.
Here’s a simple example of using chatGPT to get all view templates from current reivt document.

Ok, Ok, Revit AI is Here and we must adapt.
Here is my first proof of concept. All my millions are stuck in Silicon Valley Bank, so anyone willing to Invest in full development send me your bit coins.


of course, this will be the Basic way we would all use ChatGPT with dynamo player. Please feel Free to Deploy in your workstations.

  1. The graph will log the answers and response by date and user
  2. Once fully deployed for Engineering firms to test, I would like to collect all the answers and questions from your company to create a data base of engineering/Architectural/Building Practical uses of AI responses and Cycle them back to be analyze by a smarter version of the ITERN in later updates.
  3. Future collection of data will help developed other graphs with Specific sector focus, such as electrical, fire protection structural, fabrication ect.
  4. This could be a great teaching tool and also a powerfull augmenter to short handed design teams and international design collaboration.
    OAIR- 2023
    Gapt GPT3 Dynamo graph Intern 2023 - YouTube

The responses are still “Sub-Primal” but the GPT3 model is much better. Thanks again for the update and i can’t wait to see what other ideas this Package will spark on the community.

if anyone is also interested im adding the Text to speech output also on the graph.
Now we can have Ai Q & A logged and the computer also read the response.

I asked Chat GPT 3.5? 4 now to write this python with the help of the forum.

import sys
import clr
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
from System.Speech.Synthesis import SpeechSynthesizer, VoiceGender, VoiceAge

greatBritainCulture = System.Globalization.CultureInfo("en-GB")
spk = SpeechSynthesizer()
spk.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Senior, 0, greatBritainCulture)

# Get the input string from a Dynamo string node
input_string = IN[0]

spk.SpeakAsync(input_string)

# Output the input string as the result of the node
OUT = input_string

WMOAIR - Now talks! :shushing_face:


Thank you for your sharing. Many people have the same problem as me and would appreciate your advice.

i wonder if its a network problem on the workstation? I have only tested this on my Home office. Some countries maybe blocked from accessing the servers perhaps.

Yes, I also think that’s the main reason. But I was using a VPN, and I was able to use the chatgpt web side, but dynamo failed.

use the other open AI package may get better results

Guys I can’t find any tutorials for this anywhere!
Any help?!

1 Like