Skip to content
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

Hitting a Wall with API Rate Limit in GithubRepoLoader #37

Closed
l4time opened this issue Jun 22, 2023 · 2 comments
Closed

Hitting a Wall with API Rate Limit in GithubRepoLoader #37

l4time opened this issue Jun 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@l4time
Copy link

l4time commented Jun 22, 2023

While trying to process a directory in our GithubRepoLoader, I stumbled upon a '403 API rate limit exceeded' error. It appears we're hitting GitHub's limit for unauthenticated requests.

It is preventing us from fetching the repository files we need. And as the error message suggests, we might have better luck with authenticated requests. GitHub's REST API documentation.

Here's the error log to give more context:
Error: Failed to process directory: , Error: Unable to fetch repository files: 403 {"message":"API rate limit exceeded for x.x.x.x. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting";} at GithubRepoLoader.handleError (/app/node_modules/langchain/dist/document_loaders/web/github.cjs:180:23) at GithubRepoLoader.processDirectory (/app/node_modules/langchain/dist/document_loaders/web/github.cjs:153:18) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async GithubRepoLoader.load (/app/node_modules/langchain/dist/document_loaders/web/github.cjs:108:9) at async githubQueueController (/app/queue/controllers/github.controller.js:15:18) at async Queue.queueHandler (/app/queue/index.js:49:25)

@n4ze3m n4ze3m added the enhancement New feature or request label Jun 22, 2023
@n4ze3m
Copy link
Owner

n4ze3m commented Jun 22, 2023

Yeah, rate limiting is a significant issue. I will check the GitHub docs this weekend and come up with a solution.

@n4ze3m n4ze3m mentioned this issue Jul 20, 2023
@n4ze3m
Copy link
Owner

n4ze3m commented Jul 22, 2023

Hey, sorry for the late update, but I just released v0.0.20. It includes a custom GitHub loader that clones the repository locally instead of using the GitHub API. Additionally, it supports private repositories by allowing you to provide an access token, similar to the GitHub API. Please let me know if you encounter any issues

@n4ze3m n4ze3m closed this as completed Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants