Crawl a site to generate knowledge files to create your own custom GPT from a URL
Crawl a site to generate knowledge files to create your own custom GPT from a URL
Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文
Crawl a site to generate knowledge files to create your own custom GPT from one or multiple URLs
Here is a custom GPT that I quickly made to help answer questions about how to use and integrate Builder.io by simply providing the URL to the Builder docs.
This project crawled the docs and generated the file that I uploaded as the basis for the custom GPT.
Try it out yourself by asking questions about how to integrate Builder.io into a site.
Note that you may need a paid ChatGPT plan to access this feature
Be sure you have Node.js >= 16 installed.
git clone https://github.com/builderio/gpt-crawlernpm iOpen config.ts and edit the url and selector properties to match your needs.
E.g. to crawl the Builder.io docs to make our custom GPT you can use:
export const defaultConfig: Config = {
url: "https://www.builder.io/c/docs/developers",
match: "https://www.builder.io/c/docs/**",
selector: `.docs-builder-container`,
maxPagesToCrawl: 50,
outputFileName: "output.json",
};See config.ts for all available options. Here is a sample of the common configuration options:
…npm startTo obtain the output.json with a containerized execution, go into the containerapp directory and modify the config.ts as shown above. The output.jsonfile should be generated in the data folder. Note: the outputFileName property in the config.ts file in the containerapp directory is configured to work with the container.
To run the app as an API server you will need to do an npm install to install the dependencies. The server is written in Express JS.
To run the server.
npm run start:server to start the server. The server runs by default on port 3000.
You can use the endpoint /crawl with the post request body of config json to run the crawler. The api docs are served on the endpoint /api-docs and are served using swagger.
To modify the environment you can copy over the .env.example to .env and set your values like port, etc. to override the variables for the server.
The crawl will generate a file called output.json at the root of this project. Upload that to OpenAI to create your custom assistant or custom GPT.
Use this option for UI access to your generated knowledge that you can easily share with others
Note: you may need a paid ChatGPT plan to create and use custom GPTs right now
Use this option for API access to your generated knowledge that you can integrate into your product.
Know how to make this project better? Send a PR!
AI Agent 中文技术交流群
GPT Crawler cli Drop-in config
Unauthenticated Arbitrary File Write via outputFileName
Scrape HTML tag
Lording investment
Crawling pages not working with specific URL configuration?
`exclude` Pattern in `config.ts` Not Working as Expected
Solving JSON to MD Conversion Formatting Issues for Import into Other Knowledge Bases
bug: duplicate -m CLI flag, RESOURCE_EXCLUSTIONS typo, no URL deduplication, no crawl timing
Proposal: Add a 16-problem RAG failure checklist for debugging GPT-based knowledge from crawled sites