Skip to content

Integrating Lambda Chat into VS Code#

Introduction#

Using the CodeGPT VS Code (Visual Studio Code) extension , you can integrate Lambda Chat into VS Code. Once integrated, Lambda Chat can help explain code, find problems in code, and much more. See CodeGPT's documentation to learn more .

For this tutorial, you need to generate a Cloud API key . You can also use an existing Cloud API key.

Install the CodeGPT extension#

  1. Open VS Code.

  2. Press Ctrl + P to open Quick Open. Enter the following:

    ext install DanielSanMedium.dscodegpt
    
  3. Press Enter to install the CodeGPT extension.

Configure the Lambda Chat integration#

  1. In the Primary Sidebar, click the CODEGPT button.

    CODEGPT button in Primary Sidebar

    Select Select Your AI > Provider > Custom.

    Custom provider under Select Your AI dropdown menu

    In the Model field, enter:

    hermes-3-llama-3.1-405b-fp8
    
  2. Click Set Connection.

    In the ApiKey field, enter your Cloud API key.

    In the Custom Link field, enter:

    https://api.lambdalabs.com/v1/chat/completions
    
  3. Click Connect.

    You should see:

    CODEGPT connected

Test the Lambda Chat integration#

  1. In the menu bar, select File > New Text File.

  2. Enter a snippet of broken code in the editor, for example:

    for _ in range(3):
        printt("Hello, World!")
    
  3. Select the code, then right-click the code. Choose CodeGPT: Find Problems.

  4. Near the bottom of the Primary Sidebar, click Send.

    CODEGPT send

    In a few seconds, you should see output similar to:

    CODEGPT output