Skip to content

Commit

Permalink
add support for promptflow endpoint (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordlinus committed Mar 25, 2024
1 parent 16be120 commit e7801fe
Show file tree
Hide file tree
Showing 4 changed files with 785 additions and 313 deletions.
9 changes: 8 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,11 @@ AZURE_MLINDEX_FILENAME_COLUMN=
AZURE_MLINDEX_TITLE_COLUMN=
AZURE_MLINDEX_URL_COLUMN=
AZURE_MLINDEX_VECTOR_COLUMNS=
AZURE_MLINDEX_QUERY_TYPE=
AZURE_MLINDEX_QUERY_TYPE=
# Chat with data: Prompt flow API
USE_PROMPTFLOW=False
PROMPTFLOW_ENDPOINT=
PROMPTFLOW_API_KEY=
PROMPTFLOW_RESPONSE_TIMEOUT=120
PROMPTFLOW_REQUEST_FIELD_NAME=question
PROMPTFLOW_RESPONSE_FIELD_NAME=answer
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ Note: settings starting with `AZURE_SEARCH` are only needed when using Azure Ope
|UI_FAVICON|| Defaults to Contoso favicon. Configure the URL to your favicon to modify.
|UI_SHOW_SHARE_BUTTON|True|Share button (right-top)
|SANITIZE_ANSWER|False|Whether to sanitize the answer from Azure OpenAI. Set to True to remove any HTML tags from the response.|
|USE_PROMPTFLOW|False|Use existing Promptflow deployed endpoint. If set to `True` then both `PROMPTFLOW_ENDPOINT` and `PROMPTFLOW_API_KEY` also need to be set.|
|PROMPTFLOW_ENDPOINT||URL of the deployed Promptflow endpoint e.g. https://pf-deployment-name.region.inference.ml.azure.com/score|
|PROMPTFLOW_API_KEY||Auth key for deployed Promptflow endpoint. Note: only Key-based authentication is supported.|
|PROMPTFLOW_RESPONSE_TIMEOUT|120|Timeout value in seconds for the Promptflow endpoint to respond.|
|PROMPTFLOW_REQUEST_FIELD_NAME|question|Default field name to construct Promptflow request. Note: chat_history is auto constucted based on the interaction, if your API expects other mandatory field you will need to change the request parameters under `promptflow_request` function.|
|PROMPTFLOW_RESPONSE_FIELD_NAME|answer|Default field name to process the response from Promptflow request.|

## Contributing

Expand Down
Loading

0 comments on commit e7801fe

Please sign in to comment.