Flame Script Assistant

Hi everyone, hope you’re doing well! I wanted to share this GPT assistant designed specifically to help with Python scripting for Flame. My idea was to gather various code examples available on the Logik Portal, collect the latest API documentation from Autodesk’s site, and include transcripts from some live sessions discussing Python in Flame.

So far, the assistant has access to over 643,000 lines of code, covering scripts, documentation, and workflow examples. The goal is to make it easier for all of us to create, update, or adapt scripts for Flame.

Currently, there’s a limitation on the number of files I can include in the assistant’s knowledge base, but I can still upload about five more files of approximately 20MB each. Over the next week, I’ll be adding more resources about Pybox, Matchbox, and Inference nodes.

I hope this helps the community as much as it’s helped me! Let me know if you have any feedback or suggestions.

10 Likes

This is an interesting idea and useful resource for the community.

At the same time it’s also a great demonstration on how this technology clouds the origins of intellectual property. All of us who have written and uploaded scripts to the portal or the matchbox library do so contributing freely for the better of our community. It’s our thank you for the collective wisdom of this crowd.

And we all read each other’s script to learn and see how the system works, as the documentation is thin and hard to get by. So many scripts do stand on the shoulders of others that came before us.

In one crucial difference though, we all know who’s script we read and who did the leg work before us. I know that I borrowed heavily from John’s script, and I know I copied code lines from Lewis’ and other matchboxes. I appreciate them for their insights.

Someone writing a script with the help of ChatGPT only gets the wisdom of the collective LLM. They don’t know who they have to thank for the script they just posted, what the lines of learning were, who to give credit to.

I’m not saying it’s wrong. But it’s a insightful demonstration of the challenge this new era poses even for the well intentioned.

4 Likes

@wiltonmts - Thank you brother and Happy New Year

1 Like

@wiltonmts - it’s definitely gonna take a bit more training but bravo - good work - this will get a lot of people started and that’s the most important thing.

2 Likes

Thanks for the feedback! I got the idea for this assistant from a conversation in another thread. As a Flame artist who isn’t a programmer, I’ve always wanted a tool to help me create simple scripts for tasks, fix small issues, or even just find material to learn from. I think this GPT can be really helpful for that.

The question about references and the origin of results is really important. While this isn’t a 100% accurate solution, the assistant does its best to help identify and credit the original authors and sources used in its responses, based on the files in its knowledge base.

To improve transparency, I added detailed instructions to ensure the GPT includes:

The name of the file or document it used as a reference.

The specific script or section where the code came from.

The original author, if that information is provided in the source.

The context of the script, so you can understand its original purpose.

These references won’t always appear in the first response, but you can request them directly in the context window if you’d like to know where the code or information came from. This approach keeps things concise while still giving credit where it’s due.

The goal is to make it easier to create, adapt, and learn from scripts, while maintaining the collaborative and supportive spirit of the Flame community.

Below is an example to illustrate what I mean.

4 Likes

Happy New Year, my friend! Thanks for your kind words, that’s exactly the purpose.

2 Likes

Thanks for the thoughtful approach here, I think this is the type of approach to AI we need more off.

And my comment wasn’t meant as a critique of what you did, but more to contribute to the ongoing discussion about AI and IP, as it was an interesting case where it wasn’t some big tech company hovering up everything ala ‘do it now, ask for forgiveness later’, but it was done within a well-organized and friendly community. These are non-trivial problems - how we can harvest the power of the new AI tools without harm. And I think this is an interesting demonstration of that.

Hope your new model helps folks in the group create useful scripts.

1 Like

I’m not totally sure how I feel about this yet.

One one hand, over the years I’ve tried to help people out with their code as much as I can and I’ve been more than happy to share what I’ve written. On the other if the taking of an artists images without permission for the training of a LLM can be considered copyright infringement, does this differ any from that?

Mike

4 Likes

Hi Mike,

Thanks for bringing this up. I realize this idea might be more controversial than I initially thought, and it’s something that needs more careful thought and discussion with the community, especially to respect the amazing work of those who share their scripts here.

Because of this, I’ve decided to remove all third-party scripts from the assistant’s knowledge base. I’ll keep only the official Autodesk documentation and the example scripts included with Flame. I believe this makes things more transparent and avoids any ethical concerns.

It’s definitely a complicated situation.

On one hand, it’s nice to see others create solutions and (presumably) re-share them with the community. This can be valuable.

However it feels like a short-cut, and yet the amount of laurels you get from the community are the same?? So why should those who can code and do organic home-grown, non-GMO scripts keep bothering?

I understand the challenge that there are many Flame users that would love to patch up cracks Autodesk left behind in the product, but don’t know how to code and thus a bit stuck. I can empathize with that. In the past you would have had to beg, or pay someone. Today you just ChatGPT it.

Those of us who spent time to learn coding, whether that is self taught weekend hours in Python 101 and endless error messages and Google searches to debug, of if it’s those who have a degree in CS and spent years honing their skills - both where significant investments and efforts that get made irrelevant by these short cuts, which can yield workable scripts, but are some type of fast food Big Mac of sorts for the most part.

I also see the writing on the wall that this is just a losing battle. We’re swimming against a monster wave of people dreaming of the best fast food tech has ever delivered at bargain prices. History is full of losing battles.

If you follow industry discussion on the software engineering side, many developers now do rely on some type of AI tools to churn out code. Yet, Apple researchers have proven that doing so is not necessarily a time saver. As you don’t write the code, if there’s a bug in it, you still have to read it and understand it, and even senior developers can spend more incremental time on the debugging than they saved with AI code assistants. But I digress and that’s another topic.

1 Like

Two examples of the pitfalls of using AI models to generate code in professional settings, where the user could have written the code if they chose:

  1. Devin AI coding agent ($500/yr subscription) was asked to make a change. It included a tricky bug which nobody noticed, which caused $733 in extra cloud usage fees in one week. They paid $500 for the privilege of wasting another $733.

  2. Another Devin example - AI agent committed a 100 line code change to source base. Human developer had to go in an commit another 200 lines to cleanup unsatisfactory code aspects and make it consistent with QC standards of the code base.

Worth noting that to the unsuspecting eye, both code samples worked perfectly fine. They didn’t error out. But they weren’t good code.

Quote: Difference between a LLM and a junior dev - the junior dev will take feedback and do better next time.

Both examples quoted from a recent issue of https://www.pragmaticengineer.com/

And a real-life anecdote: My son who TAs courses in an AI research program was grading finals. A good third of the finals had to be rejected. During the semester students had used ChatGPT to write various python code. In the final they couldn’t use it. They were unable to complete the test assignments with out the AI crutch.

That is quoted from our Christmas holiday conversation.

AI has promise, but mind the gap.

3 Likes