Dynamo and Chat GPT3

Hi
I tell to chatGPT to code script for dynamo Revit and i am surprise because library used by ChatGPT seems don t exist in Dynamo like
Arc.Create(point1_arc, point2_arc, center)
or plane = Plane.from_points(point1, point2, point3)
I don t see them into dynamo …
there is “Plane.By.ThreePoints” and not “Plane.from_points(point1, point2, point3)”
same problem with Arc there is Arc.ByCenterPointStartPointEndPoint but not Arc.Create…
So from where come library used by chat GPT to code python/dynamo?
Thanks

Please , Don’t trust Chat-GPT :smiley:

10 Likes

Best ask Sam Altman.

ChatGPT may be good at lots of things, but admiting it doesn’t know the answer is not one of them unfortunately.

5 Likes

Source: “I made it up”

1 Like

Chat GPT is trained by data pulled from the internet.

There is a LOT of data on the internet. However most of that data is not code, so we (and chat gpt) can quickly reduce the data set. I can’t confirm, but I am confident that most of the code posted on the internet is not built for Dynamo. And so we have an AI which knows you want code, and some Dynamo ready code (Python or Design Script or .net) which chat gpt can see and compare to all the other code it has. But it doesn’t have the answer to your question, or if it does it can’t find it easily.

And so it infers what it might be based on the summation of all those values. And since most languages have a way to draw an arc, you get one of the ways used by those languages. Not Dynamo.

If you wanted you could try to build your own AI training data set using only Dynamo code and what is required for language processing (most of the stuff we discarded as not code); but that would likely take a lot more work than learning how to call for the arc.

1 Like

Personally I love ChatGPT.
Best invention since the internet!

But, I’d only suggest using it as a tool to help you with stuff you already feel confident with.

I used it with Python and learned more in a weekend than I’d learned in the previous year.(My Python is passable)
I used it with C# and got nowhere (my C# sucks)

Dynamo - it’s touch and go. Often I find you get a reasonable answer if you ask it more than once (word the question differently) and you only ask it small things (not to write an entire script).

Mildly amusing… I was talking to it about global variables in Python/ Dynamo…

image

Speculation on my part, but this may have to do with some recent news on using variables containing a function to get AI models not too unlike chat GPT to execute the provided code which changes their behavior; a known security vulnerability which has been present for months in one AI tool.