Skip to content

Add option to set github auth token #229

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

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

niwoerner
Copy link
Contributor

This PR allows an user to set a Github access/bearer token to authenticate against the Github API. Increases the request limit from 60 to 5000 requests per hour. When playing around with shim providers I reached the limit relatively fast. For me it was not even going away after several hours - adding an auth token fixed it.

Avoids this error:

HEAD: 403 Forbidden {"message":"API rate limit exceeded for 37.xxx.xxx.xxx. (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"}

@ibuildthecloud
Copy link
Contributor

This is a decent stop gap. The longer term thing we want to do is basically fall back to a pure git approach to this which shouldn't be rate limited. There's also a hidden feature in gptscript called "assemble" that will kind of compile the script once so it doesn't keep looking it up. But that flow doesn't fully make sense to be and that's why it's hidden. It needs to be rethought. https://github.com/gptscript-ai/story-book/blob/main/Dockerfile#L5

@ibuildthecloud ibuildthecloud merged commit 624f9b7 into gptscript-ai:main Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants