How to set up continue with Google Gemini API

Step 1: Install Continue Extension

  1. Open Visual Studio Code.

  2. Navigate to the Extensions view by clicking on the square icon on the sidebar or by pressing Ctrl+Shift+X.

  3. In the search bar, type "Continue" and press Enter.

  4. Click on the "Install" button next to the Continue extension.

Step 2: Configure Config.json

  1. After installing the Continue extension, click on the gear icon located at the bottom right side of chat interface.

  2. This will open the config.json file.

  • Modify the config.json file with the provided code below:
"models": [
    {
      "title": "Gemini Pro",
      "model": "gemini-pro",
      "contextLength": 32000,
      "apiKey": "paste your api key",
      "provider": "google-palm"
    }, // you can add add many models you want
  ],

Step 3: Get API Key from Google Gemini

  1. Open your web browser and navigate to the Aistudio.

  2. Follow the instructions provided to generate an API key.

  3. Once generated, copy the API key.

  4. Go back to Visual Studio Code and paste the API key into the "apikey" field in the config.json file.

  5. Congratulations! You have successfully configured the Continue extension with your Google Gemini API key.

Set up API using continue's GUI

  1. Click on the plus icon.

  2. Navigate to Google Gemini API model card.

  3. Paste API key and then select the model.

  4. This will automatically generate configuration for your Gemini API.

  5. Congratulations! You have successfully configured the Continue extension with your Google Gemini API key.

Conclusion

In conclusion, setting up the Continue extension for Visual Studio Code is a straightforward process that can be accomplished in a few simple steps. Whether you choose to modify the configuration file directly or utilize the Gemini API settings panel, the goal remains the same: to seamlessly integrate the extension with your development environment.

1
Subscribe to my newsletter

Read articles from KOLLU KARTHIKEYA directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

KOLLU KARTHIKEYA
KOLLU KARTHIKEYA