Regarding Data Preparation and Database

Hi , I am using the OpenAI API in my code to generate the response.

  1. I wanted to know can API read the data from the unstructured file or uncleaned file? If so then how?
  2. I am using OpenAI API to fetch the result from the database . Though I am getting the proper response but only on providing the table_Schema.
    For Example - “Can you delete notification_id 10 from the notification” - It is getting deleted.
    But if I am asking the question as “Can you delete the id 12 from the notification” - It is throwing an error as
{
  "message": "ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Certainly! Here is the SQL query to delete the row with id 12 from the `notific' at line 1"
}

Any help will save lots of time of mine.