Skip to content

Commit

Permalink
ref doc: pf flow build (microsoft#296)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
elliotzh authored Sep 4, 2023
1 parent b416e5d commit a33dfd2
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
65 changes: 65 additions & 0 deletions docs/reference/pf-command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path-to-flow> --output <output-path> --format docker
```

Build a flow as docker with specific variant.

```bash
pf flow build --source <path-to-flow> --output <output-path> --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.
Expand All @@ -175,6 +230,8 @@ pf flow serve --source
[--port]
[--host]
[--environment-variables]
[--verbose]
[--debug]
```

#### Examples
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/promptflow/promptflow/_cli/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a33dfd2

Please sign in to comment.