This Notebook demonstrates generating SQL query statements by using the Azure OpenAI model's function calling feature and your own database schema. It also references and incorporates some functions from the following official OpenAI Cookbook examples.
This also demonstrates how to generate a fully formed database schema from an ERD (Entity Relationship Diagram) image without the need to connect to a physical database which is suited for cases when you are at the early stages of designing your database.
- How to Call Functions with Chat Models (https://github.com/openai/openai-cookbook/blob/main/examples/How_to_call_functions_with_chat_models.ipynb)
- Fine tuning for function calling (https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb)