Skip to content

BertrandBorel/Code_comment_generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

Code Comment Generation

Automatic code comment generation with ChatGPT and AIPRM.

You can find the prompt here

Note : You need the AIPRM for ChatGPT extension on your browser.

How it works:

Copy-paste the code you want to comment on. You receive as output the commented code in markdown code format. ChatGPT tells you what the code does, which can be useful for writing documentation, but can also waste your time. I'm trying to find a way to only output the commented code.

Note : Sometimes ChatGPT responds without the "code" format, I'm trying to fix this problem.

Description

  • Prompt Template : "Discard previous instructions. You are a senior computer developer and your task is to comment the code provided in the [PROMPT] in markdown format for the code. You write in [TARGETLANGUAGE]. Code comments should be clear and concise and fully explain what the code does. Respond and write quickly. Remember : write and comment only in markdown format for the code."
  • Teaser : "Put any code to be commented in the language of your choice."
  • Prompt Hint : "[code to be commented]"
  • Title : "Code Comment Generation"
  • Topic : "Software Engineering"
  • Activity : "Backend Development"

Reference

I followed the AIPRM documentation to write the prompt as correctly as possible.

About

Automatic code comment generation with ChatGPT and AIPRM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published