-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'users/gega/updatellmdocserverless' of https://github.co…
…m/microsoft/promptflow into users/gega/updatellmdocserverless
- Loading branch information
Showing
121 changed files
with
2,860 additions
and
1,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# This code is autogenerated. | ||
# Code is generated by running custom script: python3 readme.py | ||
# Any manual changes to this file may cause incorrect behavior. | ||
# Any manual changes will be overwritten if the code is regenerated. | ||
|
||
name: samples_tracing_llm_tracellm | ||
on: | ||
schedule: | ||
- cron: "36 21 * * *" # Every day starting at 5:36 BJT | ||
pull_request: | ||
branches: [ main ] | ||
paths: [ examples/tutorials/tracing/llm/**, .github/workflows/samples_tracing_llm_tracellm.yml, examples/requirements.txt, examples/connections/azure_openai.yml ] | ||
workflow_dispatch: | ||
|
||
env: | ||
IS_IN_CI_PIPELINE: "true" | ||
|
||
jobs: | ||
samples_tracing_llm_tracellm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Azure Login | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
- name: Setup Python 3.9 environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Prepare requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r ${{ github.workspace }}/examples/requirements.txt | ||
pip install -r ${{ github.workspace }}/examples/dev_requirements.txt | ||
- name: setup .env file | ||
working-directory: examples/tutorials/tracing/llm | ||
run: | | ||
AOAI_API_KEY=${{ secrets.AOAI_API_KEY_TEST }} | ||
AOAI_API_ENDPOINT=${{ secrets.AOAI_API_ENDPOINT_TEST }} | ||
AOAI_API_ENDPOINT=$(echo ${AOAI_API_ENDPOINT//\//\\/}) | ||
if [[ -e .env.example ]]; then | ||
echo "env replacement" | ||
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" .env.example | ||
mv .env.example .env | ||
fi | ||
if [[ -e ../.env.example ]]; then | ||
echo "env replacement" | ||
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" ../.env.example | ||
mv ../.env.example ../.env | ||
fi | ||
- name: Create Aoai Connection | ||
run: pf connection create -f ${{ github.workspace }}/examples/connections/azure_openai.yml --set api_key="${{ secrets.AOAI_API_KEY_TEST }}" api_base="${{ secrets.AOAI_API_ENDPOINT_TEST }}" | ||
- name: Test Notebook | ||
working-directory: examples/tutorials/tracing/llm | ||
run: | | ||
papermill -k python trace-llm.ipynb trace-llm.output.ipynb | ||
- name: Upload artifact | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifact | ||
path: examples/tutorials/tracing/llm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Chat with a flow | ||
|
||
:::{admonition} Experimental feature | ||
This is an experimental feature, and may change at any time. Learn [more](../faq.md#stable-vs-experimental). | ||
::: | ||
|
||
Prompt flow provides the chat window feature to facilitate an interactive chat experience within a local environment. | ||
You can engage in conversation with the flow and view its responses directly within the chat window. | ||
|
||
## Initiating a chat window | ||
There are two methods to open a chat window: executing the prompt flow CLI command or clicking the | ||
`Open test chat page` button when viewing a flow YAML file in the Prompt flow VS Code extension. | ||
|
||
::::{tab-set} | ||
:::{tab-item} CLI | ||
:sync: CLI | ||
|
||
The following CLI command allows you to trigger a chat window. | ||
```shell | ||
pf flow test --flow . --ui | ||
``` | ||
Running the above command will yield the following example output: | ||
``` | ||
Starting prompt flow service... | ||
... | ||
You can begin chat flow on http://127.0.0.1:**/v1.0/ui/chat?flow=*** | ||
``` | ||
The browser page corresponding to the chat URL will automatically open and direct the user to a chat page | ||
corresponding to the passed flow: | ||
![chat-basic-dag-flow](../../media/how-to-guides/chat-with-a-flow/chat-basic-dag-flow.png) | ||
::: | ||
|
||
:::{tab-item} VS Code Extension | ||
:sync: VSC | ||
|
||
Click the `Open test chat page` button while viewing a flow YAML file in the Prompt flow VS Code extension, and you | ||
will be directed to the chat page. | ||
![start-chat-window-in-vsc](../../media/how-to-guides/chat-with-a-flow/start-chat-window-in-vsc.png) | ||
::: | ||
:::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.