Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
ChatGPT/Copilot for FeatureScript?
S1mon
Member Posts: 2,983 PRO
I've spent too much time over the past few days playing with ChatGPT. I've tried asking it about simple things in FeatureScript, and it just makes up code which may be more like Javascript - which is disappointing. ChatGPT supposedly doesn't know anything newer than 2021, which is also frustrating.
In any case, it seems like people are having success getting ChatGPT to write certain types of code. It's passed the AP Computer Science written exam. There are plenty of testimonials of it being able to write code that it hasn't seen before. Here's an example of some 3D graphics in three js/HTML. People are starting to get it to successfully do the advent of code exercises. ChatGPT can help debug code too.
I would love to see something like this working for FeatureScript. It's not clear how the large language model was trained on programming, but one would assume that it's scraping things like GitHub and StackOverflow. Other than this forum, and a few public resources, I wonder what can easily be scraped for training? Are the public FeatureScripts set up in a way that they get indexed by search engines? What can be done to help with training AI models on FeatureScript?
In any case, it seems like people are having success getting ChatGPT to write certain types of code. It's passed the AP Computer Science written exam. There are plenty of testimonials of it being able to write code that it hasn't seen before. Here's an example of some 3D graphics in three js/HTML. People are starting to get it to successfully do the advent of code exercises. ChatGPT can help debug code too.
I would love to see something like this working for FeatureScript. It's not clear how the large language model was trained on programming, but one would assume that it's scraping things like GitHub and StackOverflow. Other than this forum, and a few public resources, I wonder what can easily be scraped for training? Are the public FeatureScripts set up in a way that they get indexed by search engines? What can be done to help with training AI models on FeatureScript?
Tagged:
4
Comments
"Are the public FeatureScripts set up in a way that they get indexed by search engines?" This is a good question, perhaps somebody from OnShape can answer?
When GPT4 comes out, everything will likely get somewhat better, so that may help. Further down the road, hopefully some startup (or OnShape themselves) will build a model on top of GPT with additional tuning and training, resulting in an AI that performs well for this purpose. That would be awesome!
I have seen other examples like this creating a module for Odoo (An Open source ERP system)
I think Onshape could add a FeatureScript repository in their GitHub account https://github.com/onshape-public and add there the "Community sporlight" FeatureScripts
Even better, users could then add PR to that repository to add new features or improve the existing ones.
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
This would be great. It doesn't know fs, but you can give it an example and it will auto fill like excel:
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Is there some reason you’re using GPT3 instead of ChatGPT?
I didn't know I wasn't using ChatGPT lol.
Looks like ChatGPT gets overloaded by too many users, this one seems to work all the time.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
What if we allowed ChatGPT to read the code of every public PartStudio on Onshape? This would enable it to understand the geometry and features of each part, and potentially even generate new PartStudios based on user input.
Imagine being able to discuss your design ideas with ChatGPT and have it create the necessary geometry for you in real-time. This would greatly improve the design process and make it even more efficient and user-friendly. Plus, with ChatGPT's natural language processing capabilities, you could simply describe the part you need and let it do the rest.
Overall, implementing this feature would be a major step forward for Onshape and could significantly enhance the user experience.
BTW: The text above was improved by ChatGPT!!! This was my original text:
Maybe we could go a step further:
We should let ChatGPT to read the code of every public PartStudio!
Onshape could implement the possibility for ChatGPT to create new PartStudios.
Then the user could talk with ChatGPT about the needed parts and its features while Onshape creates the geometry.
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
It seemed to work, but the Playground one didn't write it all (maybe there's a word limit?) and ChatGPT had a network error due to high traffic. What I saw was promising though.
To get it to write longer code, you need to adjust the Maximum length:
Also, you can chain questions and responses if it didn't quite get it right. Below it's response, tell it the details that it missed and how to do them. Then hit submit again.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Mainly just commenting to try and draw discussion to this topic.
QUOTE — performed particularly poorly at multiple choice questions involving math
For some reason, i supposed this might be one area it would have been half decent at
Wolfram has a post about combining their tools with ChatGPT which would be pretty amazing.
I have written a series of articles on LinkedIn about ChatGPT and I just published the last one a while ago "I have failed the Turing test again".
Also some specific about ChatGPT and FeatureScript, like this https://www.linkedin.com/pulse/ejemplo-pr%C3%A1ctico-de-uso-chatgpt-con-featurescript/
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
Once I asked it to create a FeatureScript itself to build a simple cylinder. The user should be able to input radius and height. The Code had small errors but everything was there. It added inputs, created a sketch and added the extrude. It also added comments!
Interesting. I just signed up for for ChatGPT Plus, and have just started to play with GPT4. Previously when I tried to use ChatGPT (3.5) and I asked it Featurescript questions, it seemed happy to completely make up syntax which didn't make sense. I don't know what language or API it thought it was talking to, but it was useless.
I used german when I talked to it so I translated my prompt:
Of course I can help you with that! FeatureScript is a programming language developed specifically for Onshape. Here is a simple example of a FeatureScript that creates a cylinder where the user can enter radius and height:
Maybe I should ask in German
I tried it again and provided a "Template" as a start:
There are two errors: The plane for the sketch and the opExtrude command is wrong.
GPT is really interesting, but its obviously all about how much information it has to learn from. Last year I asked it to write a planning design and access statement - I was blown away at how "good" the results were, with relevant, local, and accurate planning policy references. These documents are mostly worthless page fill and box ticking exercises, and GPT is evidently very good at reproducing this. In the UK, all our planning documentation is out there in the public realm.
I then asked GPT to try and write an outline construction specification for a simple build. It was absolutely laughable. Very few architects share this information, its hard to find even half decent examples out there anywhere. Architects silo this information - its not about protecting IP per say, its just there is no reason to put it in the public domain, nor any repo to put it in.
I think that's what's so interesting about Onshape in the next 5 - 10 years. Because its all in the cloud, there are so many more examples for AI to learn from, both feature script and model building strategies. Power CAD users have been scripting custom utilities for years, but its always been kept in a silo until now. I appreciate that pro users data might not be shared publicly, but Onshape might still have access to it - if a privacy choice is made? Do we want AI to do get better at this? I do! but is that because I don't do it very well so its not my skills at risk!? To be honest I'm not really sure what my tangible skills actually are, so AI will have to identify these before it takes them from me.
It would be great to have a custom AI that you can train with Onshape data!
@sebastian_glanzner does it actually add it to its global data or only the data for that conversation?
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
This will only be relevant for the current conversation with ChatGPT