Skip to main content

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

Metadata

Release files for db-copilot-tool 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for db-copilot-tool 0.0.8
File Size Uploaded Provenance
db_copilot_tool-0.0.8.tar.gz 1.3 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for db-copilot-tool 0.0.8
File Interpreter ABI Platform
db_copilot_tool-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 2.7 MB

Release files / db_copilot_tool-0.0.8.tar.gz

Download URL db_copilot_tool-0.0.8.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ecd0d5fe6bdd100bf9ab83fcb8fe53a8afd4a08344c3a43d77be75eb9e3182b0
BLAKE2b-256 checksum
How to use checksums
84f3cb926a43cbbb958fa601d4bbe0ee35274111fbeff25574408160ae690dd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / db_copilot_tool-0.0.8-py3-none-any.whl

Download URL db_copilot_tool-0.0.8-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
42085f71a3f52cb30added0014a31302477c96082404bf8886e0b2dace66dc65
BLAKE2b-256 checksum
How to use checksums
a5bbfa034361e512e8244e402bb1155c56a0f9a5d6aa174696e2a0d0ded726fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Security for db-copilot-tool 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page