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
  1. Press Enter to install the CodeGPT extension.

Configure the Lambda Chat integration

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

Select Select Your AI > Provider > Custom.

In the Model field, enter:

hermes-3-llama-3.1-405b-fp8
  1. 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
  1. Click Connect.

You should see:

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!")
  1. Select the code, then right-click the code. Choose CodeGPT: Find Problems.

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

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

Last updated