We’re excited to share with you the Dyn Open AI package, a simple and efficient way to access the power of OpenAI models right within Dynamo. No extra setup or dependencies are needed, just install the package and start generating responses in natural language.
How to Use:
Install the Dyn Open AI package from the Package Manager.
Drop in a ChatGPT node in your Dynamo script.
Choose your preferred OpenAI model and place the node.
Set the maximum tokens per prompt anywhere between 100-2048 will always be fine (Max values for each model listed in their docs).
Input your OpenAI API key or get one from their website.
Add a number slider or number node to control the temperature (0 for straightforward answers, 1 for creative responses).
Type in your questions in a string node and run the script.
Watch the Dyn Open AI package send your question to the model and receive its response in the text field below or a watch node.
We hope you enjoy using this package as much as we enjoyed making it. Let us know if you have any questions, suggestions, or feedback!
Hi @timhevel , Can you please share your complete graph so I can take a look and see what might have gone wrong? Without the full graph, it may be difficult to determine the source of the error message you encountered.
Definitly gonna try this. Really curious about the limitations and whether it could write Python code for me etc. Could you provide some examples of easy tasks and tasks it might not be able to perform?
Thank you for your comment and the question @RevitRobot . The Dyn Open AI package offers a convenient and efficient way to access the power of OpenAI models from within Dynamo. Some of the tasks it can be used for include:
Answering FAQs: The package can help to generate responses to frequently asked questions, reducing the need for manual intervention.
Text generation: The package can be used to generate descriptions, captions, and text for architectural drawings and models.
Language translation: The package can translate texts from one language to another, overcoming language barriers in international projects.
It’s worth noting that the accuracy and functionality of the package depend on the chosen OpenAI model, temperature value, and maximum tokens. Some models may not be able to perform certain tasks, such as writing Python code, but the package is flexible and can still be used for a wide range of tasks.
Regarding your question about producing code, I believe the Code-Davinci002 and Text-Davinci-002 models may be able to produce code, but you would still need to inspect, correct, and manually extract code from the text generated by the model.
Overall, I hope you find the Dyn Open AI package useful and we encourage you to give it a try and share with us what you are able to create.
I don’t charge for the package and there is no intention to do so, but since you mentioned it, Yes, there is a cost associated with accessing OpenAI’s API service. OpenAI calculates fees based on the number of API calls, which are charged per prompt, and per maximum tokens, it’s almost negligible. You can find more information on OpenAI’s pricing page: Pricing. Additionally, OpenAI recently introduced a premium subscription package that offers advanced features, including reduced latency and improved performance.
Less pyrevit Python code out there for it to scrape, and it’s probably being queries for Dynamo Python on average vs pyRevit specifically. pyRevit specific nuances such as having to reference DB for Revit API classes will usually be the main reason it wont work I’d say.
Try different queries/ prompts, give it more or less description, and use different temperatures and token counts, try Text-Davinci-002 and Code-Davinci-002.
after all, you still need to double-check the produced code before executing it, as Gavin said it’s not trained on much Revit-related data.
Could it not be trained on all possible node connections? i mean I’m pretty sure an Element.Panels node does not work by attaching a Boolean or a Math.Ceiling etc
I got this by asking ChatGTP on how to get this going:
To get an API key from OpenAI, you will need to create an account on their website and follow the instructions to request access to their API. Here are the general steps:
Go to the OpenAI website and click on the “Get Started for Free” button at the top of the page.
Fill out the registration form with your name, email address, and other required information.
Choose the product that you want to access. In this case, you will want to select the GPT-3 API.
Follow the instructions to provide additional information, such as your intended use case and your company or organization (if applicable).
Once you have completed the application process, you will need to wait for OpenAI to review your request and approve your access. This can take some time, as OpenAI carefully reviews each application to ensure that their products are being used responsibly.
Once your application is approved, you will receive an API key that you can use to access the GPT-3 API. Follow the instructions provided by OpenAI to authenticate and start using the API.
Please note that OpenAI’s GPT-3 API is a paid product, and you will need to have a valid payment method on file to use it. However, OpenAI does offer a free trial that you can use to test the API before committing to a paid plan.
So it doesn’t really look like I can use this yet because of the cost
I already mentioned they have a premium paid service, you may visit this link and you will be able to generate a free API key. Account API Keys - OpenAI API
Apparently regular ChatGPT seems to know Codeblock and Python language as well.
If you ask for the same thing multiple times, it will provide different answers. At a later moment I will check the provided link. This is definitly an interesting query to keep track of.
this is amazing i have been testing the different models recently and its full of amazing potential. One thing i noticed is that on the CHATGPT the conversations are saved / A continuous conversation with AI allows a string of user inputs (filters) to accumulate data for a better final responses. currently when using it seems it starts a new chat for every time we run. Is there a way to save the conversation in a way that the AI uses previous questions?