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.8.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: db_copilot_tool-0.0.8.tar.gz
  • Upload date:
  • Size: 1.3 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.8.tar.gz
Algorithm Hash digest
SHA256 ecd0d5fe6bdd100bf9ab83fcb8fe53a8afd4a08344c3a43d77be75eb9e3182b0
MD5 c4741332084d15360147172532a78ee1
BLAKE2b-256 84f3cb926a43cbbb958fa601d4bbe0ee35274111fbeff25574408160ae690dd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for db_copilot_tool-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 42085f71a3f52cb30added0014a31302477c96082404bf8886e0b2dace66dc65
MD5 a2cfea703e279c294fd9988eeee411f2
BLAKE2b-256 a5bbfa034361e512e8244e402bb1155c56a0f9a5d6aa174696e2a0d0ded726fd

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