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
Built Distribution
File details
Details for the file db_copilot_tool-0.0.6.tar.gz
.
File metadata
- Download URL: db_copilot_tool-0.0.6.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55e0f07042fa6895ecf5d80d3e392b64bd8912a4219e31c61b9ec03267013d6e |
|
MD5 | 9b348ebadae960711f2c242fda398bc8 |
|
BLAKE2b-256 | c3adb625d50ae508d2c30908d491501d14cd6651a0271228caab27d62d6c84b4 |
File details
Details for the file db_copilot_tool-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: db_copilot_tool-0.0.6-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad486987357296df84cec12b22f9a1e81b3f372d2a538f6dee89d33ed41353f |
|
MD5 | c4e8b839bf84388bd9f6d916c01f36f3 |
|
BLAKE2b-256 | 1b37ae9d4a6658cfa5a251bd4ef9f336d7f9faf84eef82434dbc52f5a0f22339 |