Assist with using sports stats data & OpenAI API to generate game summaries/previews

Job ID: 36740848

Budget: $30 – $250 USD

Request details
i have an SQL instance on GCP with stats for various sports, I need help with Python code that will retrieve the data from the SQL database, the schedule data will be parsed by date, then grouped with teams' stats data to be used in OpenAI prompt to generate text. I have done most of the code for this, but having issues with grouping the data and having it work with the OpenAI API. I have a cloud run app that will be used to generate the content, then store it in the SQL database. I will provide the code I have so far, it shouldn't be too hard to complete for an experienced programmer.

Deliverables
completed cloud run app that;

correctly parses the schedule data based on the current date
the stats from the various database tables will be grouped into the home and away teams in the scheduled data for each event.
the stats data will then be used in code with openAI prompt to generate the content
content is stored in the database