Skip to content

This is sample code using Semantic Kernel to show how to chain functions based on a natural language driven Sequential Planner in SK

Notifications You must be signed in to change notification settings

MTCMarkFranco/python-sql-Interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Kernel - PYTHON-SQL-INTERPRETER

The PYTHON-SQL-INTERPRETER console application demonstrates how to execute a semantic function.

Prerequisites

Configuring the solution

The solution can be configured with a .env file in the project which holds api keys and other secrets and configurations.

Make sure you have an Azure Open AI service key

Copy the .env.example file to a new file named .env. Then, copy those keys into the .env file:

# OPEN AI Settings
OPENAI_API_KEY=""
OPENAI_ORG_ID=""
AZURE_OPENAI_DEPLOYMENT_NAME=""
AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_API_KEY=""

# SQL DB Settings
SERVER_NAME=
DATABASE_NAME=""
SQLADMIN_USER=""
SQL_PASSWORD=""

solution design and sample execution

Main Code flow: Main Code

Sample Database Schema: DB Schema

Sample Output: Code Run

Running the solution

To run the console application within Visual Studio Code, just hit F5. As configured in launch.json and tasks.json, Visual Studio Code will run python main/main.py

To build and run the console application from the terminal use the following commands:

python main/main.py

About

This is sample code using Semantic Kernel to show how to chain functions based on a natural language driven Sequential Planner in SK

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages