Giter Site home page Giter Site logo

vscode-chatgpt-plus's Introduction


ChatGPT PLUS

Make ChatGPT your partner to improve your programming experience.

With just one click, you can create files/projects, fix your code, or utilize OpenAI's official GPT3 APIs--all without any configuration! Simply put your API key in the settings, and begin! Exporting all your conversation history at once in Markdown format is also easily done.

Features

The extension includes a context menu commands that enables you to send the chosen text or code to the chatGPT service and display the output in the chatGPT panel. This panel allows you to copy or move the code to the current file or create a new file and then move the result there.

API Key

You need to create an API key and enter it into your Visual Studio Code settings to use this extension:

{
  "chatgptplus.apiKey": "YOUR API KEY"
}

Available Commands

  • ChatGPT: Ask Anything
  • ChatGPT: Refactor Code
  • ChatGPT: Generate Comment
  • ChatGPT: Generate Code
  • ChatGPT: Generate Tests
  • ChatGPT: Find Bugs
  • ChatGPT: Optimize Code
  • ChatGPT: Explain Code
  • ChatGPT: Clear Conversation
  • ChatGPT: Export Conversation
  • ChatGPT: Rewrite Selection
  • ChatGPT: Send Selection
  • ChatGPT: Summarize Selection

Refactor Code

Refactor Code


Generate Comment

Generate Comment


Generate Code

Generate Code


Generate Tests

Generate Tests


Find Bugs

Find Bugs


Optimize Code

Optimize Code


Explain Code

Explain Code


Rewrite Selection

Rewrite Selection


Summarize Selection

Summarize Selection


Customize your code prompts or use defaults

        "chatgptplus.promptPrefix.addTest": {
          "default": {
            "default": "Generate tests:"
          },
          "description": "The prompt prefix used for adding tests for the selected code",
          "type": "object"
        },
        "chatgptplus.promptPrefix.summarize": {
          "description": "The prompt prefix used for summarizing text.",
          "default": "Summarize text: ",
          "type": "string"
        },
        "chatgptplus.promptPrefix.comment": {
          "default": {
            "default": "Generate short comment: "
          },
          "description": "The prompt prefix used to generate comment for selected code.",
          "type": "object"
        },
        "chatgptplus.promptPrefix.explain": {
          "default": {
            "default": "Explain code: "
          },
          "description": "The prompt prefix used for explaining the selected code",
          "type": "object"
        },
        "chatgptplus.promptPrefix.findProblem": {
          "default": {
            "default": "Find problems: "
          },
          "description": "The prompt prefix used for finding problems for the selected code",
          "type": "object"
        },
        "chatgptplus.promptPrefix.generate": {
          "default": {
            "default": "Generate code: "
          },
          "description": "The prompt prefix used generate code base on text",
          "type": "object"
        },
        "chatgptplus.promptPrefix.optimize": {
          "default": {
            "default": "Optimize code: "
          },
          "description": "The prompt prefix used for optimizing the selected code",
          "type": "object"
        },
        "chatgptplus.promptPrefix.refactor": {
          "default": {
            "default": "Refactor code and explain what's changed: "
          },
          "description": "The prompt prefix used for refactoring the selected code",
           "type": "object"
        },
        "chatgptplus.promptPrefix.rewrite": {
          "default": "Rewrite following sentence: ",
          "description": "Will try to rewrite sentences.",
          "type": "string"
        }

If you wish to set prompts based on file type, simply include the file name and the prompt value you desire:

        "chatgptplus.promptPrefix.addTest": {
          "typescript": "Generate tests typescript:"
        }

Set Prompts Base on File type

Extension Options

        "chatgptplus.apiKey": {
          "description": "Openai api key to communicate with chatgpt api",
        },
        "chatgptplus.maxTokens": {
          "default": 1000,
          "description": "The maximum number of [tokens](/tokenizer) to generate in the completion.  The token count of your prompt plus `max_tokens` cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).",
        },
        "chatgptplus.model": {
          "default": "text-davinci-003",
          "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.",
        }

Caveats & Limitations

Although the conversation panel appears to be having a conversation with ChatGPT, it is not. This extension uses the official OpenAPI library to communicate with the ChatGPT API and this library does not yet provide a conversation API. This means that it will only provide an answer to the current question asked and will not be aware of any preceding conversations.

Disclaimer

  • Using this extension comes with no guarantee that it will continue to function as intended, without any issues or side-effects. Please proceed with caution, as it may be subject to changes that are out of our control. For example, OpenAI may make unannounced alterations to some or all of its features, which could have an impact on this extension's performance.

  • This extension never uses or stores your personally identifiable information.

  • This extension will use an API Key stored in the settings.json file. Please note that VS Code may sync this key across its instances and this is outside of this extension's boundary. If you are not comfortable with this, then you should not use the extension.

  • The extension will only collect metadata in order to improve its features, with no personally identifiable information being collected. You can choose whether or not to enable telemetry by setting either 'telemetry.telemetryLevel' or 'chatgptplus.telemetry.disable' to their respective values; the extension will then only collect metadata if both of these settings have allowed telemetry.

  • We cannot be held liable for any issues that may arise while using this extension. Please note that your use of OpenAI services is subject to OpenAI's Privacy Policy and Terms of Use.

Credits

vscode-chatgpt-plus's People

Contributors

ccpu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.