Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error in passing input 'gemini-1.5-pro-latest' 'RESOURCE EXHAUSTED ISSUE'

I'm trying to pass the 18000 lines of code as a input, in the Gemini pro latest model, but I got 'resource exhausted' issue, even in gemini api they mentioned in the documents that we can pass 2M tokens but i as per token calculation i passed only 27k tokes still getting this issue 

Please help anyone how to resolve this issue and pass the large text(code) input. 

0 2 289
2 REPLIES 2

Hello,

Thank you for contacting the Google Cloud Community.

The "resource exhausted" error you're encountering likely indicates that the model is running out of computational resources to process the input. Even though you might be within the theoretical token limit, other factors like model complexity, input structure, and current server load can influence resource consumption.

Regards,
Jai Ade

Hello,

Thank you for your engagement regarding this issue. We haven’t heard back from you regarding this issue for sometime now. Hence, I'm going to close this issue which will no longer be monitored. However, if you have any new issues, Please don’t hesitate to create a new issue. We will be happy to assist you on the same.

Regards,
Jai Ade