/devGPT

This is a vscode + openai extension demo (inspired by https://github.com/timkmecl/codegpt)

Primary LanguageTypeScript

My VS Code Extension for OpenAI API

Introduction

This extension allows developers to interact with the OpenAI API directly within VS Code. It provides a convenient interface for sending prompts to OpenAI and receiving responses.

Prerequisites

  • Visual Studio Code
  • Node.js (v14.0.0 or higher)
  • npm or yarn package manager

Creating Your First VS Code Extension

  1. Install Yeoman and VS Code Extension Generator: Run npm install -g yo generator-code.
  2. Create a New Project: Run yo code and follow the prompts to create your extension project.
  3. Navigate to Project Directory: Use cd my-extension to navigate into the project directory.
  4. Install Dependencies: Run npm install to install the required dependencies.
  5. Open in VS Code: Open the project in VS Code by running code ..

Running the Extension Locally

  1. Open the Project in VS Code: If not already open, open the project in VS Code.
  2. Press F5: This starts the debugging session and opens a new VS Code window with the extension loaded.
  3. Use the Extension: Test your extension in the new window and use the debug tools as needed.

Connecting to OpenAI API

  • Set Up API Keys: Ensure that you have the necessary API keys and credentials for OpenAI.
  • Configure Extension: Add your API keys and any other configuration to the extension settings.
  • Use the OpenAI Features: Use the extension's OpenAI-related features as described in the documentation.

Contribution and Support

Feel free to contribute to this project or seek support by opening an issue on the GitHub repository.


Happy coding with your new VS Code extension!