after setting this up it worked for about 8 hours then stopped. after investigating, i found that i was hitting an API limit. My front door is revolving with kids, farm animals, etc going by it all the time. Any ideas on how i overcome the limit? I’ve tried to find it in the quota settings on the Google AI API, but they are all set to 0.
Error: Error generating content: 429 Quota exceeded for quota metric ‘Generate Content API requests per minute’ and limit ‘GenerateContent request limit per minute for a region’ of service ‘generativelanguage.googleapis.com’ for consumer . [reason: “RATE_LIMIT_EXCEEDED” domain: “googleapis.com” metadata { key: “service” value: “generativelanguage.googleapis.com” } metadata { key: “quota_metric” value: “generativelanguage.googleapis.com/generate_content_requests” } metadata { key: “quota_location” value: “us-east7” } metadata { key: “quota_limit” value: “GenerateContentRequestsPerMinutePerProjectPerRegion” } metadata { key: “quota_limit_value” value: “0” } metadata { key: “consumer” value: } , links { description: “Request a higher quota limit.” url: “View and manage quotas | Cloud Quotas | Google Cloud” } ]
It will reset every minute for those quotas. You’d need to add logic for a cooldown with a helper srnsor to keep track of last request sent timestamp, etc.