Buddycode Gpt: Blender Copilot - Powerful Coding Companion

by EasyLight in Addons


What Sets BuddyCode GPT Apart

Latest Updates! Check out the video!

https://youtu.be/XLZaqCzFxng?si=f4ABjRlx659wA7Kd

https://youtu.be/9PMVtcou7bY


Seamless Integration

BuddyCode seamlessly integrates into your Blender workflow, providing a user-friendly interface directly within the Text Editor. Say goodbye to constant tab-switching and hello to uninterrupted coding sessions.


Effortless Organization

With BuddyCode, organizing your code files is a breeze. Navigate through your projects effortlessly with the built-in file browser, keeping your scripts tidy and accessible at all times.


Instant Code Generation

Need to create a new Python script? BuddyCode has you covered. Generate new files instantly with just a click, saving you time and hassle.


Smart Code Completion

Boost your productivity with BuddyCode’s intelligent code completion. Receive context-aware suggestions powered by advanced AI models, helping you write code faster and more efficiently.


Visual Inspiration

BuddyCode’s image processing feature. Incorporate visual cues into your coding process to spark new ideas and innovative solutions.


Effortless Sharing

Share code snippets seamlessly with the built-in clipboard functionality. Copy output text with a single click, streamlining collaboration and enhancing productivity.


LM Studio & Ollama Integration

BuddyCode harnesses the power of LM Studio and Ollama, free desktop apps, for its advanced AI-driven features. LM Studio and Ollama provide the underlying AI models required for BuddyCode’s intelligent code completion.


Download LM Studio here for free.

Download Ollama here for free.

Checkout the BUDDYCODE GPT Website here.


Experience the Difference with BuddyCode GPT

Unlock the full potential of Blender's Text Editor with BuddyCode by your side. Whether you're a seasoned developer or just starting out, BuddyCode is your go-to tool for smoother, more efficient coding sessions. Try BuddyCode today and take your Blender coding experience to new heights.


 Installation


1. *Download the Add-on Script: Obtain the add-on script from the source or repository.


2. Install the Add-on:

   - Launch Blender and navigate to `Edit > Preferences > Add-ons`.

   - Click on the "Install..." button.

   - Locate the downloaded add-on script and select it.

   - Once installed, ensure the add-on is enabled by checking the checkbox next to its name.


Usage


1. Introduction


BuddyCode is a Blender addon designed to integrate AI-powered code generation and text completion capabilities directly into the Text Editor. This powerful tool streamlines various creative and technical tasks by leveraging advanced language models like Ollama, Google Gemini, and LM Studio.


2. Features


Real-time Code Completion: Get suggestions for your code as you type, reducing errors and accelerating your workflow.


Code Generation: Generate code snippets from natural language prompts, saving time and effort.


Text Completion: Complete sentences or paragraphs based on context, improving writing fluency and reducing writer's block.


Multi-Pair Execution: Run multiple code snippets or prompts concurrently, streamlining repetitive tasks.


Context-Aware Generation: Provide context to the AI by loading documents and using vector search to retrieve relevant information.


Chat History: Keep track of your conversations with the AI and refer to previous responses.


File Browser: Navigate and manage your files within Blender, streamlining your workflow.


Module Installation: Install Python modules directly from within Blender, simplifying library management.


3. Requirements


Blender: Version 2.80 or higher.


Python 3: Required for running the addon.


Langchain: Library for interacting with various AI models.


Langchain Community: Library for connecting to specific AI models like Ollama, Google Gemini, and LM Studio.


Pyperclip: Library for clipboard operations.


FAISS: Library for efficient vector search (optional for document loading).


Ollama API: If using the Ollama model, you need to have the Ollama API running.


Google Gemini API: If using the Google Gemini model, you need to have a Google Gemini API key and the Google Cloud SDK installed.


LM Studio: If using the LM Studio model, you need to have the LM Studio API running.


4. Installation


Download the BuddyCode addon from [link to addon source].


Enable the "Add-ons" menu in Blender's preferences (Edit -> Preferences -> Add-ons).


Click the "Install" button and select the downloaded addon file.


Enable the BuddyCode addon by ticking the checkbox.


5. Usage


5.1 File Browser


Open the Text Editor in Blender.


Navigate to the "BuddyCode Browser" tab in the Text Editor sidebar.


Select the folder containing your files using the "Folder Path" field.


Create new folders and files within the browser using the provided operators.


Load existing Python files by selecting them from the file list.


5.2 AI Integration


Navigate to the "BudyGPT" tab in the Text Editor sidebar.


Input your code or text prompt in the "Input Text" field.


Optionally, provide a "System Prompt" for specific instructions or context.


Adjust the "temperature" value to control the randomness and creativity of the AI's response.


Click "Get Completion Suggestions" to generate code or text.


Click "Clear Chat History" to start a new conversation with the AI.


Use the "Run Multiple Pairs" and "Run All Pairs" operators to execute multiple tasks at once.


5.3 Multi-Pair Execution


Navigate to the "Buddy Code Multiple Pairs" tab.


Define multiple pairs of input text, system prompt, and temperature values.


Use the "Run All Pairs with Context" operator to process the pairs with context.


Use the "Run All Pairs No Context" operator to process the pairs without context.


6. Customization


Addon Preferences:


Server Type: Choose the desired server type (LM Studio, Ollama, Gemini) in the addon preferences.


Model Type: Select the specific language model to use for code completion and text generation.


Endpoint URL: If using the LM Studio model, provide the API endpoint URL.


API Keys: Enter your Google Gemini API key and application key if using the Gemini model.


Enable Vision: Toggle image vision processing for the model.


Image Path: Set the path to an image for vision processing.


CSV Path: Set the path to a CSV file for analysis.


Document Loading:


Document Path: Specify the path to the document you want to load for context-aware generation.


Database Path: Provide the path to the FAISS database for persisting document embeddings.


7. Troubleshooting


Installation Errors: Ensure all required libraries are installed correctly. Use pip install [library_name] in your terminal.


Connection Errors: Verify that your API endpoints are running correctly and that you have the required API keys.


No Completion Suggestions: Check your network connection and API connectivity. Make sure the language model is configured correctly.


Unexpected Results: Experiment with different prompts and system instructions to refine the AI's responses.


8. Examples


Code Completion: Type def hello_world( ) and the AI will suggest completing the code with def hello_world():\n print("Hello, world!").


Code Generation: Enter the prompt "Create a function that calculates the factorial of a number" and the AI will generate Python code for the factorial function.


Text Completion: Start typing "The quick brown fox jumps over" and the AI will suggest completing the sentence with "the lazy dog."


Multi-Pair Execution: Create multiple pairs of code snippets or prompts and use the "Run All Pairs" operator to execute them concurrently.



9. Disclaimer


BuddyCode is under development and may contain limitations or bugs. The author is not responsible for any damages caused by using this addon.


Preferences


1. Endpoint URL:

   - Set the URL for the completion suggestions endpoint.


2. Server Type and Model Type:

   - Choose the server and model type for obtaining completion suggestions.


3. Enable Vision:

   - Toggle image vision processing on or off.


4. Image Path and CSV Path:

   - Specify paths for image files and CSV files if needed.


Additional Notes


- This add-on is still under development, and certain features may be subject to limitations or bugs.

- For advanced users, additional settings and functionalities are available through the preferences panel.


Installation Issues:

If you are facing a problem shown below for any module issue:


Traceback (most recent call last):

  File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\addon_utils.py", line 364, in enable

    mod = importlib.import_module(module_name)

  File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\python\lib\importlib\__init__.py", line 126, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "", line 1050, in _gcd_import

  File "", line 1027, in _find_and_load

  File "", line 1006, in _find_and_load_unlocked

  File "", line 688, in _load_unlocked

  File "", line 883, in exec_module

  File "", line 241, in _call_with_frames_removed

  File "C:\Users\matth\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\BuddyCode.py", line 10, in

    from langchain_community.llms import ollama

ModuleNotFoundError: No module named 'langchain_community'


USE CHECK OUT THIS Youtube link:


https://www.youtube.com/watch?v=DSRha-8Zk8w&ab_channel=CGFigures


By CGFigures. I have use his codebase,tricks have also added it inside my own code for your convenience to solve this problem and it does solve it for me.


This is not a addon issue it how the packages are getting installed.


  • Step 1: Locate the AppData file in your "C" drive or where you have your programs installed.
  • Step 2: Find the site-packages folder
  • Step 3: check the blender console to check where the files are being downloaded.
  • Step 4: Copy all related module folders and paste them inside the site-packages folder.


For more INFO on this visit the link above. 


LM Studio & Ollama Integration

Before using BuddyCode GPT, ensure you have LM Studio and Ollama installed on your system.


LM Studio and Ollama provide the underlying AI models required for BuddyCode GPT's intelligent code completion features.


Running Models Locally

Enjoy hassle-free AI-powered code completion by running LM Studio and Ollama models locally on your machine.


Simply configure BuddyCode GPT to use the local endpoint URLs provided by LM Studio and Ollama, and experience lightning-fast completion suggestions without the need for internet connectivity.


Experience seamless AI-driven code completion by leveraging LM Studio and Ollama models directly on your local system, eliminating any potential hassles. The Free Addon provides you with LM Studio Integration ONLY! That is enough for you to get started. Rest is behind paywall so if you want future updates please feel free to buy the paid version since you will get integration with both LM Studio and Ollama Servers also the latest and greatest Updates!


Published 4 months ago
Blender Version 4.1, 4.0, 3.6, 3.5, 3.4
License Mit
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message