
Below is shown the code behind the data extraction, AI Reasoning, and Supabase feeder by using Python
First, we initialize the variables and clients to connect with Gemini and Supabase API
Next, the data extracted from RSS. Since the RSS is in XML format, we used the feedparser to make the XML into dictionary objects in Python. From there, we extract desired value that will be sent both to Supabase and Gemini.
Since we only able to request to Gemini API up to 20 requests per day, we need to make sure only extracting the data that is not available on Supabase. And make sure that the data is new.
If new data exist, the code will start the AI Reasoning. For more details, here is the behind the scene on how I made it two steps AI call instead of one,
Here is the code for supabase and gemini reasoning: