This extension allows users to generate documentation for their code using OpenAI's GPT-3 language model.
- Generate documentation for selected code by running the
Documentation: OpenAIcommand - Get an explanation of selected code by running the
Documentation: OpenAI Explaincommand
- An OpenAI API key, which can be obtained here.
This extension contributes the following settings:
OpenAiDocs.apiKey: OpenAI API key.OpenAiDocs.temperature: Temperature setting for OpenAI model. Higher values will result in more creative and varied responses, while lower values will result in more predictable and accurate responses.
Documentation: OpenAI: Generate documentation for selected code.Documentation: OpenAI Explain: Get an explanation of selected code.
- Select the code you want to generate documentation for.
- Run the
Documentation: OpenAIcommand. - Wait for the response from the OpenAI API (this can take a while).
- The documentation will be opened in a new untitled file.
To get an explanation of selected code, follow the same steps but use the Documentation: OpenAI Explain command instead.
- The OpenAI API can be slow, so generating documentation or explanations may take a while.
Now max_tokens can be dinamically changed from the settings
Initial release of the OpenAI Documentation Extension for VS Code.