feat: [DHIS2] Generate library documentation with Gen AI #1590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey everyone,
@jenniferarnesen and I talked briefly about how you could use generative AI to write documentation for you public libraries.
I did something similar on another project, so I'll post a how-to-guide here and you can decide if you want to do something similar.
TLDR
This is the resulting documentation created by AI
I used an editor called Cursor to write documents. Cursor is basically just a vscode fork where they try to implement GPT 4. You can read more at their website, but the main gist is that they embed your repository and provide contextual related code snippets to OpenAI. This gives the AI context of your code and surrounding components, increasing the relevance of your AI completions.
Here's how to create docs
Cmd + K
AnalyticsDocs.mp4
How to improve your response
Everything written in
Prompts/generate-documentation.md
will be treated as rules for the AI. This means, if you need it to abide by some sort of guidelines, write it in this file and the AI will follow.There are some limitations to this though;
object
orfunc
. (The same thing as defined in propTypes)