Skip to main content

nl2sql tool for prompt flow

Project description

nl2sql tool for prompt flow

How to create promptflow endpoint your workspace

1. Prepare your workspace

Open your workspace in Azure ML studio portal
Example Studio Portal URL:
https://main.ml.azure.com/?wsid=/subscriptions/1b75927d-563b-49d2-bf8a-772f7d6a170e/resourceGroups/ragdev/providers/Microsoft.MachineLearningServices/workspaces/RAGDev&flight=promptDesigner&tid=72f988bf-86f1-41af-91ab-2d7cd011db47

2. Create a ci (compute instance)

Create a ci with name with prefix "ci-lin-cpu-0-" , for example ci-lin-cpu-0-alan

3. Config Customer Application on your ci

3.1 Application Name

Application Name has to be: promptflow-runtime

3.2 Port

Target Port and Published Port have to be: 8080

3.3 Docker Image

docker image can be modulesdkpreview/prt:tag.
For example: modulesdkpreview/prt:v20230420-140738

3.4 Restart ci

4. Install dbcopilot on your ci

4.1 Open Terminal of your ci

4.2 upload whl files to your ci

dbcopilot-0.2.0-py3-none-any.whl (get it from https://dev.azure.com/TScience/NL2Code/_artifacts/feed/AIMS.TScience.NL2Code/PyPI/dbcopilot/overview/0.3.0)
db_copilot_tool-0.1.0-py3-none-any.whl
embeddingstore-0.0.1-py3-none-any.whl (optional)
promptflow_sdk-0.0.1-py3-none-any.whl (optional)

4.3 Install whl files in promptflow container

Find your promptflow container id with command: docker ps -a
Copy whl files to promptflow container with command: docker cp xxx.whl <container_id>:/xxx.whl
Login promptflow container with command: docker exec -it <container_id> /bin/bash
install whl files with command: pip install xxx.whl

4.4 Install Microsoft ODBC in promptflow container

Reference Doc: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16&tabs=ubuntu18-install%2Calpine17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline#18
Commands:
apt-get update
apt-get install -y curl lsb-core
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install -y msodbcsql18
apt-get install -y unixodbc-dev

4.5 Restart promptflow container

exit docker stop container_id
docker start container_id

5. Copy Local DB file to promptflow container (optional)

6. Get promptflow endpoint url

promptflow endpoint url can be found in the ci overview page, click "promptflow-runtime" link

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

db_copilot_tool-0.0.5.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

db_copilot_tool-0.0.5-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file db_copilot_tool-0.0.5.tar.gz.

File metadata

  • Download URL: db_copilot_tool-0.0.5.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for db_copilot_tool-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a19aaa24f351e95966b935d1d435cd2f6b0ecfa14fc8729c10fd1e0cfc6ba1c7
MD5 67d2fd8f4d2c5fb7cc5821c5ee2eccac
BLAKE2b-256 a3bacd84edce5141edb8ad8ae94593c77246d01b0c177197086f6059bf2769a5

See more details on using hashes here.

File details

Details for the file db_copilot_tool-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for db_copilot_tool-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bc84c0e56e6a3e4d1bda74f11f4a3707e40481dad2d9594df2d4747a2a220e55
MD5 7394b2c716cd840dd285dfcd9ec99089
BLAKE2b-256 87885ff7f20c8c6904dba63e62892d3eb9311c88c4f038e43b58c2c43ebad4e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page