Revit-API-03

/

/

/

revit-api/03-get-ai-assistant

Get AI Assistant for Revit API Development

Let's get you an AI Coding assistant so you can code faster and smarter right away.

Revit-API-03

/

/

/

revit-api/03-get-ai-assistant

Get AI Assistant for Revit API Development

Let's get you an AI Coding assistant so you can code faster and smarter right away.

Lesson Objectives

  • Why you need AI Coding Assistant?

  • Choose the right AI-Assistant

  • How to install and use AI-Assistant

    Are you Ready?

Summary

Why You Need an AI Assistant

Before we dive into coding, we need to get you an AI Assistant. This is an absolute game changer for any beginner or even for seasoned developers.

AI assistants help you:

  • Code faster by providing suggestions

  • Write code that normally needs referencing docs

  • Handle tricky math

  • Write Docs

  • Refactor code

  • And more.

And listen, AI is not perfect, and it can hallucinate more than sleep deprived developers, but it can help you work faster and smarter.

So it's very important that you get one ASAP. And don't think that it will replace you or do everything for you. It's just a tool to help you be better.

So Many AI Assistants - Which One Is Right?

To be honest, there are too many AI Assistants available and it's very hard to choose the right one. You might have even heard about some already:

  • GitHub CoPilot

  • Continue AI

  • Cursor IDE AI

  • TabNine

  • Cody

  • Codeum

  • And hundreds more.

Here is the thing:

It doesn't matter which one you choose, but you should definitely choose something.


I will show you how to install and start using one of them in a moment, but first let me share five points on how to choose the right AI coding assistant.

#1 - Flexible LLM Choice

While experimenting with different assistants, I realized that pretty much all of them do the same thing. They have an AI chat, and they can interact with your code-editor while you code.

However, I've also noticed that you might get vastly different results when you change LLM models you use. You might select 4o from OpenAI, Sonnet 3.5 from Anthropic, or even go with DeepSeek.

Therefore, I find it important for myself to be able to switch between different LLM models. I don't want to be locked in only to a single company. You might have different view on that, but I like to experiment to get better results over time.

#2 - Free vs Paid

While choose an AI Assistant, you will notice that nearly all of them offer something like 'Free Tier For Life'. And while it's a great marketing, it's not so practical in real-world.

They offer that by either limiting how much you can use AI, or by giving you much older and dumber models that give you worse results.

Either way, you start hating you AI-Assistant when you need it the most. Therefore I highly recommend you to jump around assistants using Trial versions until you find something worth paying for.

And to be honest, it's not so expensive. They are usually $9-$20/month, and you get to use the latest and greatest AI for writing code. It's like a few cups of coffee, but it will make you way more productive.

#3 - Codebase Awareness

Another great point to consider, is if AI-Assistant aware of the codebase or context.

It means that it can see your whole project, and all files you were working on. This will help it understand your environment better and provide you better suggestions.

I find this point very important because we work on a very niche topic - Revit API and pyRevit. So it's great if it can learn a little from your project to provide better results.

PS. I think that nowadays, all of AI assistants have this feature. There are zero reasons not to have it…

#4 - Privacy & Security

Another important aspect to consider is security and privacy if you work in a large company.

Personally, I think that all of them are safe enough and I'm not so concerned about privacy of my code. I'm not building the next unicord so I don't mind it either.

But I know that some of you love privacy and you wouldn't mind going extra mile to make it happen. So you might want to talk to your IT department, or look for privacy-friendly options.

Spoiler: There are some options that focus on that a lot.

#5 - Running AI Locally

Lastly, if you have a high-end PC, you might want to run AI models locally for improved privacy and control.

I won't go into the details, but you can make it happen in pyCharm or VS Code by using Ollama for running LLMs and Continue AI for connecting it to code editors.

If you are unsure you can handle running it locally, you can check your GPU's VRAM memory in Task Manager and compare it to model requirements. (Check the lesson\s video to learn more about it).

Installing AI Assistant

Alright, now let's install one of assistants, so you can see how easy it is to make it work. And keep in mind that no matter what you choose, they all work the same and have the same installation process.

I don't really want to recommend anything specific, but let's go with TabNine for now. That's what I use at the moment and I'm quite fine with it. But I might switch later to test something else. (I'm not affiliated with anyone).


So here is the installation process:

  • Create an Account

  • Choose Free Trial / Paid Plan

  • Download Plugin in pyCharm or VS Code

  • Login into your account in the plugin

  • Start using it

That's pretty much it. You can follow me along during the video if you want to see steps more in depth.

And keep in mind that Tabnine also provides 14 days trial without creating an account. So, you might even skip first few few steps. And if you encounter any issues try installing another AI-Assistant. Don't feel like you should use the same one I do.

Change Key Binding

Once you have an AI Assistant I find it helpful to change 1 key binding to accept the suggestions. By default all AI-Assistant use Tab key to accept the suggestion.

But I use Tab and Shift+Tab all the time to move code right and left. And because of that I often accepted code suggestions that I didn't want because I just tried to move my piece of code to the side.

Therefore I suggest you to change it to another key too. But that's totally optional.

Here is how to do that in pyCharm:

  • Open Settings

  • Go to Keymap

  • Find Keymap for TabNine (or another plugin)

  • Find Accept Completion

  • Change to what you prefer. ( I use the the key that is under [Esc] and above [Tab] )

How to use AI Assistant

Once installed, AI assistants offer features like:

  • Chat-Based conversation

  • Inline Code Suggestions

  • Suggestions based on comments

  • Code Explanation and Correction (buttons above functions)

  • Reference other files in the chat

  • And a lot more.

I won't go into too much details, as you will learn everything you need as you start using it. Experiment with different LLM models, settings, and features and you will adjust your workflow to use AI alongside you.

HomeWork

And now it's time to get you an AI Coding Assistant. AI Assistant will save you a lot of hours, especially if you are just a beginner.

You can download the same one that I used, or choose any other one. But you should definitely get at least something. It's just an ultimate life hack for both beginners and seasoned developers.

⌨️ Happy Coding!

Questions:

What is the best AI-Assistant?

What is the best AI-Assistant?

Discuss the lesson :

P.S. Sometimes this chat might experience connection issues.

Use Discord App for best experience.

Discuss the lesson :

P.S. Sometimes this chat might experience connection issues.

Use Discord App for best experience.

Discuss the lesson :

P.S. Sometimes this chat might experience connection issues.

Use Discord App for best experience.

Unlock Community

The pyRevit Hackers Community is only available with pyRevit Hackers Bundle.
Upgrade Here to Get Access to the community and all pyRevit Courses.

Use coupon code "upgrade" to get 150EUR Discount as a member.

⌨️ Happy Coding!

Unlock Community

The pyRevit Hackers Community is only available with pyRevit Hackers Bundle.
Upgrade Here to Get Access to the community and all pyRevit Courses.

Use coupon code "upgrade" to get 150EUR Discount as a member.

⌨️ Happy Coding!

Unlock Community

The pyRevit Hackers Community is only available with pyRevit Hackers Bundle.
Upgrade Here to Get Access to the community and all pyRevit Courses.

Use coupon code "upgrade" to get 150EUR Discount as a member.

⌨️ Happy Coding!

© 2023-2024 EF Learn Revit API

© 2023-2024 EF Learn Revit API

© 2023-2024 EF Learn Revit API