chore: import upstream snapshot with attribution
dotnet-build-and-test / dotnet-test-functions (push) Has been cancelled
dotnet-build-and-test / paths-filter (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Debug, windows-latest, net9.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net8.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-foundry-hosted-it (push) Has been cancelled
dotnet-build-and-test / dotnet-build-and-test-check (push) Has been cancelled
dotnet-build-and-test / Integration Test Report (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
dotnet-build-and-test / dotnet-test-functions (push) Has been cancelled
dotnet-build-and-test / paths-filter (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Debug, windows-latest, net9.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net8.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-foundry-hosted-it (push) Has been cancelled
dotnet-build-and-test / dotnet-build-and-test-check (push) Has been cancelled
dotnet-build-and-test / Integration Test Report (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
This commit is contained in:
+57
@@ -0,0 +1,57 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: ConditionGroup
|
||||
id: check_system
|
||||
conditions:
|
||||
|
||||
- condition: =IsBlank(System.Conversation)
|
||||
id: conversation_check
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: conversation_bad
|
||||
|
||||
- condition: =IsBlank(System.Conversation.Id)
|
||||
id: conversation_id_check1
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: conversation_id_bad1
|
||||
|
||||
- condition: =IsBlank(System.ConversationId)
|
||||
id: conversation_id_check2
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: conversation_id_bad2
|
||||
|
||||
- condition: =IsBlank(System.LastMessage)
|
||||
id: message_check
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: message_bad
|
||||
|
||||
- condition: =IsBlank(System.LastMessage.Id)
|
||||
id: message_id_check1
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: message_id_bad1
|
||||
|
||||
- condition: =IsBlank(System.LastMessageId)
|
||||
id: message_id_check2
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: message_id_bad2
|
||||
|
||||
- condition: =IsBlank(System.LastMessageText)
|
||||
id: message_text_check
|
||||
actions:
|
||||
- kind: EndWorkflow
|
||||
id: message_text_bad
|
||||
|
||||
elseActions:
|
||||
- kind: SendActivity
|
||||
id: activity_passed
|
||||
activity: PASSED!
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# This workflow demonstrates how to use the Question action
|
||||
# to request user input and confirm it matches the original input.
|
||||
#
|
||||
# Note: This workflow doesn't make use of any agents.
|
||||
#
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_demo
|
||||
actions:
|
||||
|
||||
# Capture original input
|
||||
- kind: SetVariable
|
||||
id: set_project
|
||||
variable: Local.OriginalInput
|
||||
value: =System.LastMessage.Text
|
||||
|
||||
# Request input from user
|
||||
- kind: Question
|
||||
id: question_confirm
|
||||
alwaysPrompt: false
|
||||
autoSend: false
|
||||
property: Local.ConfirmedInput
|
||||
prompt:
|
||||
kind: Message
|
||||
text:
|
||||
- "CONFIRM:"
|
||||
entity:
|
||||
kind: StringPrebuiltEntity
|
||||
|
||||
# Confirm input
|
||||
- kind: ConditionGroup
|
||||
id: check_completion
|
||||
conditions:
|
||||
|
||||
# Didn't match
|
||||
- condition: =Local.OriginalInput <> Local.ConfirmedInput
|
||||
id: check_confirm
|
||||
actions:
|
||||
|
||||
- kind: SendActivity
|
||||
id: sendActivity_mismatch
|
||||
activity: |-
|
||||
"{Local.ConfirmedInput}" does not match the original input of "{Local.OriginalInput}". Please try again.
|
||||
|
||||
- kind: GotoAction
|
||||
id: goto_again
|
||||
actionId: question_confirm
|
||||
|
||||
# Confirmed
|
||||
elseActions:
|
||||
- kind: SendActivity
|
||||
id: sendActivity_confirmed
|
||||
activity: |-
|
||||
You entered:
|
||||
{Local.OriginalInput}
|
||||
|
||||
Confirmed input:
|
||||
{Local.ConfirmedInput}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: CreateConversation
|
||||
id: conversation_create1
|
||||
conversationId: Local.PrivateConversationId
|
||||
|
||||
- kind: SendActivity
|
||||
id: sendActivity_conversation
|
||||
activity: |-
|
||||
Conversation 1: {Local.PrivateConversationId}
|
||||
Conversation 2: {System.ConversationId}
|
||||
|
||||
- kind: AddConversationMessage
|
||||
id: add_message
|
||||
message: Local.MyMessage1
|
||||
role: User
|
||||
conversationId: =Local.PrivateConversationId
|
||||
content:
|
||||
- type: Text
|
||||
value: {System.LastMessage.Text}
|
||||
|
||||
- kind: RetrieveConversationMessage
|
||||
id: get_message_single
|
||||
message: Local.MyMessage1Copy
|
||||
conversationId: =Local.PrivateConversationId
|
||||
messageId: =Local.MyMessage1.Id
|
||||
|
||||
- kind: SendActivity
|
||||
id: sendActivity_message
|
||||
activity: |-
|
||||
Message 1: {Local.MyMessage1}
|
||||
|
||||
- kind: CopyConversationMessages
|
||||
id: copy_messages
|
||||
conversationId: =System.ConversationId
|
||||
messages: =[Local.MyMessage1]
|
||||
|
||||
- kind: RetrieveConversationMessages
|
||||
id: get_messages_all
|
||||
messages: Local.AllMessages
|
||||
conversationId: =System.ConversationId
|
||||
|
||||
- kind: SendActivity
|
||||
id: sendActivity_copy
|
||||
activity: Done!
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_greet
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: MenuAgent
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_menu
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: MenuAgent
|
||||
input:
|
||||
messages: =UserMessage("What's on today's menu?")
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_item
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: MenuAgent
|
||||
input:
|
||||
messages: =UserMessage("How much is the clam chowder?")
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# This workflow tests invoking HttpRequestAction end-to-end.
|
||||
# Uses the Azure ARM tenants endpoint, which is authenticated, fully static, and
|
||||
# reachable with the credentials the integration test pipeline already provides
|
||||
# (via az login). The bearer token is supplied by the test through a custom
|
||||
# HttpClient passed to DefaultHttpRequestHandler; the YAML deliberately does not
|
||||
# carry an Authorization header.
|
||||
#
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_http_request_test
|
||||
actions:
|
||||
|
||||
# Invoke the Azure ARM tenants list API.
|
||||
- kind: HttpRequestAction
|
||||
id: fetch_tenants
|
||||
conversationId: =System.ConversationId
|
||||
method: GET
|
||||
url: https://management.azure.com/tenants?api-version=2022-09-01
|
||||
headers:
|
||||
Accept: application/json
|
||||
response: Local.TenantsResponse
|
||||
|
||||
# Surface the first tenant id from the parsed JSON response. Every
|
||||
# authenticated principal belongs to at least one tenant, so this path
|
||||
# always resolves on a successful call.
|
||||
- kind: SendMessage
|
||||
id: show_first_tenant
|
||||
message: "{First(Local.TenantsResponse.value).tenantId}"
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_poem
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: PoemAgent
|
||||
input:
|
||||
arguments:
|
||||
style: "ee cummings"
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_inner1
|
||||
agent:
|
||||
name: TestAgent
|
||||
input:
|
||||
messages: =UserMessage("Can an LLM think of funny jokes?")
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_inner2
|
||||
agent:
|
||||
name: TestAgent
|
||||
input:
|
||||
messages: =UserMessage("Do you know the joke about the chicken crossing the road? Tell me an improved version of that joke.")
|
||||
output:
|
||||
autoSend: true
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_external
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: TestAgent
|
||||
input:
|
||||
messages: =UserMessage("Rate the originality of this well known joke that is being re-told on a scale of 1 to 10. Take note on where improvements or changes were made.")
|
||||
output:
|
||||
messages: Local.RatingResponse
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# This workflow tests invoking function tools directly from a workflow.
|
||||
# Uses the MenuPlugin functions: GetMenu, GetSpecials, GetItemPrice
|
||||
#
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_invoke_function_tool_test
|
||||
actions:
|
||||
|
||||
# Set the item name we want to look up
|
||||
- kind: SetVariable
|
||||
id: set_item_name
|
||||
variable: Local.ItemName
|
||||
value: Chai Tea
|
||||
|
||||
# Invoke GetSpecials function to get today's specials
|
||||
- kind: InvokeFunctionTool
|
||||
id: invoke_get_specials
|
||||
functionName: GetSpecials
|
||||
conversationId: =System.ConversationId
|
||||
output:
|
||||
autoSend: false
|
||||
result: Local.Specials
|
||||
|
||||
# Invoke GetItemPrice function to get the price of a specific item
|
||||
- kind: InvokeFunctionTool
|
||||
id: invoke_get_item_price
|
||||
functionName: GetItemPrice
|
||||
conversationId: =System.ConversationId
|
||||
arguments:
|
||||
name: =Local.ItemName
|
||||
output:
|
||||
autoSend: true
|
||||
result: Local.ItemPrice
|
||||
|
||||
# Ask an agent the price from the results in the conversation
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_menu
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: TestAgent
|
||||
input:
|
||||
messages: =UserMessage("What's the price of Chai Tea?")
|
||||
output:
|
||||
messages: Local.AgentResponse
|
||||
|
||||
# Send the result as an activity
|
||||
- kind: SendMessage
|
||||
id: show_price_result
|
||||
message: "{Local.AgentResponse}"
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# This workflow tests invoking function tools with approval requirement.
|
||||
# Uses the MenuPlugin function: GetItemPrice with requireApproval: true
|
||||
#
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_invoke_function_tool_approval_test
|
||||
actions:
|
||||
|
||||
# Set the item name we want to look up
|
||||
- kind: SetVariable
|
||||
id: set_item_name
|
||||
variable: Local.ItemName
|
||||
value: Clam Chowder
|
||||
|
||||
# Invoke GetItemPrice function with approval requirement
|
||||
- kind: InvokeFunctionTool
|
||||
id: invoke_get_item_price
|
||||
functionName: GetItemPrice
|
||||
conversationId: =System.ConversationId
|
||||
requireApproval: true
|
||||
arguments:
|
||||
name: =Local.ItemName
|
||||
output:
|
||||
autoSend: false
|
||||
result: Local.ItemPrice
|
||||
|
||||
# Send the result as an activity
|
||||
- kind: SendMessage
|
||||
id: show_price_result
|
||||
message: "The price of {Local.ItemName} is ${Text(Local.ItemPrice)}"
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# This workflow tests invoking MCP tools directly from a workflow.
|
||||
# Uses the Microsoft Learn MCP server: search tool
|
||||
#
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_invoke_mcp_tool_test
|
||||
actions:
|
||||
|
||||
# Set the search query we want to use
|
||||
- kind: SetVariable
|
||||
id: set_search_query
|
||||
variable: Local.SearchQuery
|
||||
value: Azure OpenAI
|
||||
|
||||
# Invoke MCP search tool on Microsoft Learn server
|
||||
- kind: InvokeMcpTool
|
||||
id: invoke_mcp_search
|
||||
serverUrl: https://learn.microsoft.com/api/mcp
|
||||
serverLabel: microsoft_docs
|
||||
toolName: microsoft_docs_search
|
||||
conversationId: =System.ConversationId
|
||||
arguments:
|
||||
query: =Local.SearchQuery
|
||||
output:
|
||||
autoSend: true
|
||||
result: Local.SearchResult
|
||||
|
||||
# Send the result as an activity
|
||||
- kind: SendMessage
|
||||
id: show_search_result
|
||||
message: "Search results: {Local.SearchResult}"
|
||||
# message: "Search results for {Local.SearchQuery}: {Local.SearchResult}"
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# This workflow tests invoking MCP tools with approval requirement.
|
||||
# Uses the Microsoft Learn MCP server: search tool with requireApproval: true
|
||||
#
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_invoke_mcp_tool_approval_test
|
||||
actions:
|
||||
|
||||
# Set the search query we want to use
|
||||
- kind: SetVariable
|
||||
id: set_search_query
|
||||
variable: Local.ContentUrl
|
||||
value: https://learn.microsoft.com/azure/ai-foundry/openai/concepts/use-your-data
|
||||
|
||||
# Invoke MCP search tool with approval requirement
|
||||
- kind: InvokeMcpTool
|
||||
id: invoke_mcp_search
|
||||
serverUrl: https://learn.microsoft.com/api/mcp
|
||||
serverLabel: MicrosoftLearn
|
||||
toolName: microsoft_docs_fetch
|
||||
requireApproval: true
|
||||
arguments:
|
||||
url: =Local.ContentUrl
|
||||
output:
|
||||
autoSend: false
|
||||
result: Local.FetchResult
|
||||
messages: Local.FetchMessages
|
||||
|
||||
# Send the result as an activity
|
||||
- kind: SendMessage
|
||||
id: show_search_result
|
||||
message: "Content for {Local.ContentUrl}: {Local.FetchResult}"
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_vision
|
||||
agent:
|
||||
name: VisionAgent
|
||||
input:
|
||||
messages: =System.LastMessage
|
||||
output:
|
||||
autoSend: true
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: InvokeAzureAgent
|
||||
id: invoke_vision
|
||||
conversationId: =System.ConversationId
|
||||
agent:
|
||||
name: VisionAgent
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: RequestExternalInput
|
||||
id: get_input
|
||||
variable: Local.MyInput
|
||||
|
||||
- kind: SendMessage
|
||||
id: show_input
|
||||
message: "You provided: {Local.MyInput}"
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
# Capture input
|
||||
- kind: SetVariable
|
||||
id: set_user_input
|
||||
variable: Local.UserInput
|
||||
value: =System.LastMessage.Text
|
||||
|
||||
# Capture environment variable
|
||||
- kind: SetVariable
|
||||
id: set_user_name
|
||||
variable: Global.UserName
|
||||
value: TestAgent
|
||||
|
||||
# Respond with input
|
||||
- kind: SendActivity
|
||||
id: send_result
|
||||
activity: |-
|
||||
Hello {Global.UserName},
|
||||
You said, "{Local.UserInput}"
|
||||
Reference in New Issue
Block a user