-
Notifications
You must be signed in to change notification settings - Fork 0
Generate llms-full.txt by using gitingest script
#931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate llms-full.txt by using gitingest script
#931
Conversation
Introduces `scripts/generate-llms-full.py` to generate `llms-full.txt` by leveraging the gitingest package instead of `docusaurus-plugin-llms`. The script handles installation of gitingest if missing, configures include/exclude patterns, and writes the output to the build directory.
Introduces a new npm script `generate-llms-full` that runs a Python script for generating LLMs data. The build process now includes this step to ensure LLMs data is generated during builds.
Set `generateLLMsFullTxt` to false in `docusaurus-plugin-llms` configuration. This change is made because gitingest is now used to generate a more detailed llms-full.txt file.
Introduces documentation explaining the purpose, usage, requirements, and configuration of the `generate-llms-full.py` script. The README details how the script uses gitingest to create an AI-friendly `llms-full.txt` file with enhanced context for documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @josh-wong, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
I've updated our Docusaurus site build process to generate llms-full.txt using a custom Python script that leverages gitingest. This change moves away from the default plugin-based method to provide a more comprehensive and context-rich llms-full.txt file, which includes front-matter metadata and directory structure, making our documentation more effective for AI models.
Highlights
- Custom LLM file generation: I've introduced
scripts/generate-llms-full.py, a new Python script that utilizesgitingestto createllms-full.txtwith enhanced metadata and context for AI models. - Build process integration: The Docusaurus build script in
package.jsonnow includes a new step to execute this Python script, ensuringllms-full.txtis generated during every build. - Plugin option disabled: I've updated
docusaurus.config.jsto disable thedocusaurus-plugin-llmsplugin's built-ingenerateLLMsFullTxtoption, explicitly indicating our reliance on the new custom script. - New documentation: I've added
scripts/README.mdto provide detailed documentation on the motivation, usage, requirements, and benefits of this newgitingest-based workflow.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively replaces the docusaurus-plugin-based generation of llms-full.txt with a custom Python script using gitingest. The changes are well-documented with a new README, and the build process is correctly updated. The Python script itself is robust, with good error handling. I've provided a couple of suggestions to improve the clarity of the documentation and the maintainability of the new script by refactoring hardcoded values into constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a custom script-based approach for generating llms-full.txt that leverages gitingest to provide richer documentation context and metadata for AI models, replacing the default plugin-based method.
Key Changes
- New Python script: Added
generate-llms-full.pythat uses gitingest to create comprehensivellms-full.txtwith front-matter metadata and directory tree structure - Updated build process: Modified the build pipeline to include the new script execution and disabled the plugin's built-in generation
- Enhanced CI/CD: Updated GitHub Actions workflows to install the required Python dependency
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate-llms-full.py | Core Python script that generates llms-full.txt using gitingest with custom filtering and formatting |
| scripts/README.md | Documentation explaining the motivation, usage, and benefits of the new gitingest-based approach |
| package.json | Added generate-llms-full script command and integrated it into the build process |
| docusaurus.config.js | Disabled plugin's built-in generateLLMsFullTxt option with reference to new documentation |
| .github/workflows/test-deploy.yml | Added Python dependency installation for gitingest |
| .github/workflows/deploy.yml | Added Python dependency installation for gitingest |
Description
This PR updates the process for generating
llms-full.txtduring Docusaurus site builds, switching from the default plugin-based method to a custom script that leverages gitingest for richer documentation context. The main changes introduce a new Python script, update build tooling, and provide detailed documentation for this new workflow.Related issues and/or PRs
llms.txtfiles were previously added in Generate llms.txt files on build for LLM reference #924.Changes made
scripts/generate-llms-full.py, a Python script that installs gitingest if necessary and generatesllms-full.txtwith improved metadata and context for AI models.package.jsonnow runs a newgenerate-llms-fullstep, which executes the Python script to generate a comprehensivellms-full.txtby using gitingest.docusaurus.config.jsto disable the plugin's built-ingenerateLLMsFullTxtoption, clarifying that the new method is preferred and referencing the documentation for details.scripts/README.md, which explains the motivation, usage, requirements, and benefits of the newgenerate-llms-full.pyscript and the gitingest-based workflow.Checklist
Additional notes (optional)
N/A