mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
0f913bcdeb
* Checkpoint * Update test workflows * Update workflows/MathChat.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update folder * Cleanup * Signed package version * Rollback nuget.config * Cleanup * Set `ProductContext` * Move product initialization. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
#
|
|
# This workflow demonstrates a single agent interaction based on user input.
|
|
#
|
|
# Any Foundry Agent may be used to provide the response.
|
|
# See: ./setup/QuestionAgent.yaml
|
|
#
|
|
kind: Workflow
|
|
trigger:
|
|
|
|
kind: OnConversationStart
|
|
id: workflow_demo
|
|
actions:
|
|
|
|
# Capture original input
|
|
- kind: SetVariable
|
|
id: set_project
|
|
variable: Topic.OriginalInput
|
|
value: =System.LastMessage.Text
|
|
|
|
# Request input from user
|
|
- kind: Question
|
|
id: question_confirm
|
|
alwaysPrompt: false
|
|
property: Topic.ConfirmedInput
|
|
prompt:
|
|
kind: Message
|
|
text:
|
|
- "CONFIRM:"
|
|
entity:
|
|
kind: StringPrebuiltEntity
|
|
|
|
# Confirm input
|
|
- kind: ConditionGroup
|
|
id: check_completion
|
|
conditions:
|
|
|
|
# Didn't match
|
|
- condition: =Topic.OriginalInput <> Topic.ConfirmedInput
|
|
id: check_confirm
|
|
actions:
|
|
|
|
- kind: SendActivity
|
|
id: sendActivity_mismatch
|
|
activity: |-
|
|
"{Topic.ConfirmedInput}" does not match the original input of "{Topic.OriginalInput}". Please try again.
|
|
|
|
- kind: GotoAction
|
|
id: goto_again
|
|
actionId: question_confirm
|
|
|
|
# Confirmed
|
|
elseActions:
|
|
- kind: SendActivity
|
|
id: sendActivity_confirmed
|
|
activity: |-
|
|
You entered:
|
|
{Topic.OriginalInput}
|
|
|
|
Confirmed input:
|
|
{Topic.ConfirmedInput}
|
|
|
|
|
|
|