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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: db_copilot_tool-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 81f746b41a75fa365004ff5c78732ca9269765c83a490a496630deaf8d60349c
MD5 5a73bae85105016bb654da8e6d678093
BLAKE2b-256 ccd3df50247cf3805cba95eb73d3932f343a96350c0f5c021d2cd7a18418b645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for db_copilot_tool-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 530b6c22fc43d83a80e5402fcae2cb23beed1adbc6ca9f8d574a279efa1f9139
MD5 0ea3719d9f4c42c206e7a4236996c260
BLAKE2b-256 8e79262a6467e48b86952e11119efaa61da6d6fea5ea4d208b7f136f3735c5ab

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