From a33dfd2fefe2d8eacc8bc6c915e87429ea937711 Mon Sep 17 00:00:00 2001 From: Xingzhi Zhang <37076709+elliotzh@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:07:04 +0800 Subject: [PATCH] ref doc: pf flow build (#296) # Description Reference doc for `pf flow build`. # All Promptflow Contribution checklist: - [x] **The pull request does not introduce [breaking changes]** - [x] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [x] **I have read the [contribution guidelines](../CONTRIBUTING.md).** ## General Guidelines and Best Practices - [x] Title of the pull request is clear and informative. - [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [x] Pull request includes test coverage for the included changes. --- docs/reference/pf-command-reference.md | 65 +++++++++++++++++++++++ src/promptflow/promptflow/_cli/_params.py | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/docs/reference/pf-command-reference.md b/docs/reference/pf-command-reference.md index 3f3c64289b6..dc5bb83f9aa 100644 --- a/docs/reference/pf-command-reference.md +++ b/docs/reference/pf-command-reference.md @@ -166,6 +166,61 @@ Start a interactive chat session for chat flow. Displays the output for each step in the chat flow. +### pf flow build + +Build a flow for further sharing or deployment. + +```bash +pf flow build --source + --output + --format + [--variant] + [--verbose] + [--debug] +``` + +#### Examples + +Build a flow as docker, which can be built into Docker image via `docker build`. + +```bash +pf flow build --source --output --format docker +``` + +Build a flow as docker with specific variant. + +```bash +pf flow build --source --output --format docker --variant '${node_name.variant_name}' +``` + +#### Required Parameter + +`--source` + +The flow or run source to be used. + +`--output` + +The folder to output built flow. Need to be empty or not existed. + +`--format` + +The format to build flow into + +#### Optional Parameters + +`--variant` + +Node & variant name in format of ${node_name.variant_name}. + +`--verbose` + +Show more details for each step during build. + +`--debug` + +Show debug information during build. + ### pf flow serve Serving a flow as an endpoint. @@ -175,6 +230,8 @@ pf flow serve --source [--port] [--host] [--environment-variables] + [--verbose] + [--debug] ``` #### Examples @@ -211,6 +268,14 @@ The host of endpoint. Environment variables to set by specifying a property path and value. Example: --environment-variable key1="\`${my_connection.api_key}\`" key2="value2". The value reference to connection keys will be resolved to the actual value, and all environment variables specified will be set into `os.environ`. +`--verbose` + +Show more details for each step during serve. + +`--debug` + +Show debug information during serve. + ## pf connection Manage prompt flow connections. diff --git a/src/promptflow/promptflow/_cli/_params.py b/src/promptflow/promptflow/_cli/_params.py index 128c5da8384..793be0257a9 100644 --- a/src/promptflow/promptflow/_cli/_params.py +++ b/src/promptflow/promptflow/_cli/_params.py @@ -233,7 +233,7 @@ def add_param_variant(parser): def add_parser_build(parent_parser, entity_name: str): - description = f"Build a {entity_name} as a docker image or a package." + description = f"Build a {entity_name} for further sharing or deployment." parser = parent_parser.add_parser( "build", description=description,