Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.57 KB

README.md

File metadata and controls

46 lines (38 loc) · 1.57 KB

Working with Connection

This folder contains example YAML files for creating connection using pf cli. Learn more on all the connections types.

Prerequisites

  • Install promptflow sdk and other dependencies:
pip install -r requirements.txt

Get started

  • To create a connection using any of the sample YAML files provided in this directory, execute following command:
# Override keys with --set to avoid yaml file changes
pf connection create -f custom.yml --set configs.key1='<your_api_key>'
pf connection create -f azure_openai.yml --set api_key='<your_api_key>'
  • To create a custom connection using an .env file, execute following command:
pf connection create -f .env --name custom_connection
  • To list the created connection, execute following command:
pf connection list
  • To show one connection details, execute following command:
pf connection show --name custom_connection
  • To update a connection that in workspace, execute following command. Currently only a few fields(description, display_name) support update:
# Update an existing connection with --set to override values
# Update an azure open ai connection with a new api base
pf connection update -n open_ai_connection --set api_base='<your_api_base>'
# Update a custom connection
pf connection update -n custom_connection --set configs.key1='<your_new_key>' secrets.key2='<your_another_key>'
  • To delete a connection:
pf connection delete -n custom_connection