oliversen / chatgpt-docstrings

VSCode extension to automatically generate docstrings using ChatGPT
https://marketplace.visualstudio.com/items?itemName=oliversen.chatgpt-docstrings
MIT License
3 stars 2 forks source link
chatgpt docstring-generator python vscode-extension

ChatGPT: Docstring Generator

Visual Studio Marketplace Version GitHub

Automatically generate docstrings using ChatGPT.

Demo

Installation

Install it from Visual Studio Marketplace or download and install .vsix file from Releases.

Requirements

Usage

Code Completion

Type """ and select Generate Docstring (ChatGPT) from the completion items.

Code Completion

Context Menu

Right click in the Text Editor area and select Generate Docstring (ChatGPT).

Context Menu

Command Palette

Open the Command Palette (F1), type docstring and select Generate Docstring (ChatGPT).

Command Palette

Keyboard Shortcut

Use the following keyboard shortcut:

Keyboard Shortcut

You can change the default keyboard shortcut by Keyboard Shortcuts editor (File > Preferences > Keyboard Shortcuts).

OpenAI API key

To use the extension, you will need an OpenAI API key. To obtain one, follow these steps:

  1. Go to OpenAI's website. Log in or sign up there.
  2. Click on the Create new secret key button.
  3. Copy the key and paste it into the field that will show up when you run the docstring generation.

You can change the API key using the Set OpenAI API key command in the Command Palette (F1).

Settings

Telemetry

This extension collects anonymous information related to the usage of the extension, such as well as performance and error data. You can disable telemetry as described here.

Change Log

See Change Log here

Feedback

Submit the issues if you find any bug or have any suggestion.

Contribution

Fork the repo and submit pull requests.

License

This extension is licensed under the MIT License