e768098d0e
Flake8 Lint / flake8 (push) Waiting to run
Publish Promptflow Doc / Build (push) Waiting to run
Publish Promptflow Doc / Deploy (push) Blocked by required conditions
Spell check CI / Spell_Check (push) Waiting to run
tools_continuous_delivery / Private PyPI main branch release (push) Waiting to run
tools_continuous_delivery / Private PyPI non-main branch release (push) Waiting to run
1.6 KiB
1.6 KiB
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
YAMLfiles 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
.envfile, 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 OpenAI 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