e-p-armstrong / augmentoolkit

Convert Compute And Books Into Instruct-Tuning Datasets
MIT License
584 stars 79 forks source link

feat: add gemini api support #18

Closed alexandreteles closed 1 month ago

alexandreteles commented 1 month ago

This PR adds support for the Gemini APIs. To use it, set the BASE_URL to "gemini" and use the one of the available Gemini models as your logical/large logical model.

Google has an extremely strict number of concurrent requests before you start getting a 429 HTTP error. I have met the issue with only two concurrent requests, which I set as the maximum limit for this API otherwise it will not work. Gemini is cheap and fast, but the rate limits might make it non-ideal for this usage unless your starting data is fairly small.

Please review and let me know if you would like something to be changed (or change it yourselves ofc).

Merging this should close #15

darkacorn commented 1 month ago

lgtm

darkacorn commented 1 month ago

@heralax looks good to be merged