src/Private/Report/AI/Get-MCSMetroAIGoalsOfSfMC.ps1

function Get-MCSMetroAIGoalsOfSfMC {
    Param(
        $MetroAgent,
        $ExtraRequest,
        $Debug
    )

    if ($Debug.IsPresent) {
        $DebugPreference = "Continue"
    } else {
        $DebugPreference = "SilentlyContinue"
    }

    Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"Getting Goals of SfMC by AI")

    $Conversation = New-MetroAIConversation

    $ContextPrompt = @"
The Support for Mission Critical is a specialized team with deep technical knowledge
that focus on ensuring the Microsoft customer's have the best experience possible regarding best practices for their Azure environment,
resilience and security for their most critical solutions running on Azure.
 
Pretend you are conducting a presentation using PowerPoint and now we are going to present a slide to executive level audience,
about the Goals of the Support for Mission Critical team
 
Now I'm going to ask you to rewrite some texts about the 3 pillars of the Support for Mission Critical ("Accelerate time to value", "Drive solution reliability", "Do more with your solution")
 
Answering rules:
- Produce only the final explanation text, suitable for insertion into a PowerPoint table cell.
- The explanation must be between 8 and 11 words.
- The explanation must absolutely not look it was written by AI and should not contain anything besides the requested answer.
- Do not include references, source titles, URLs, citations, or "Official reference" by default.
- Do not include markdown formatting.
- Do not use bullet points.
- Do not include phrases such as "Understood", "I searched", "looked sources", "did not find", "if you wish", "if you prefer", or apologies.
- Do not offer to search again.
 
$ExtraRequest
"@


    try
        {
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"Setting context about the pillars of SfMC to the AI")
            $turn  = Invoke-MetroAIConversation -AgentId $MetroAgent.id -ConversationId $Conversation.id -UserInput $ContextPrompt -Debug:$false
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"AI Response ID: $($turn.ResponseId)")
            Start-Sleep -Milliseconds 500
        }
    catch
        {
            Write-Warning "Error invoking AI conversation for Goals of SfMC. Error: $_"
        }

    $Prompt = "Regarding the topic of 'Accelerate time to value', please rewrite the following text: 'Reach your goals faster with a solution-specific support plan tailored to your unique needs'."

    try
        {
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"Getting Time to Value pillar of SfMC rewritten by the AI")
            $timetovalue  = Invoke-MetroAIConversation -AgentId $MetroAgent.id -ConversationId $Conversation.id -UserInput $Prompt -Debug:$false
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"AI Response ID: $($timetovalue.ResponseId)")
            Start-Sleep -Milliseconds 500
        }
    catch
        {
            Write-Warning "Error invoking AI conversation for Goals of SfMC. Error: $_"
            $timetovalue = @{ AssistantText = "Reach your goals faster with a solution-specific support plan tailored to your unique needs" }
        }

    $Prompt = "Regarding the topic of 'Drive solution reliability', please rewrite the following text: 'Drive stability and maximize uptime of your most important solutions with holistic, full-care strategies'."

    try
        {
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"Getting Drive Solution Reliability pillar of SfMC rewritten by the AI")
            $solutionreliability  = Invoke-MetroAIConversation -AgentId $MetroAgent.id -ConversationId $Conversation.id -UserInput $Prompt -Debug:$false
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"AI Response ID: $($solutionreliability.ResponseId)")
            Start-Sleep -Milliseconds 500
        }
    catch
        {
            Write-Warning "Error invoking AI conversation for Goals of SfMC. Error: $_"
            $solutionreliability = @{ AssistantText = "Drive stability and maximize uptime of your most important solutions with holistic, full-care strategies" }
        }

    $Prompt = "Regarding the topic of 'Do more with your solution', please rewrite the following text: 'Discover new ways your solution can work for you with expert guidance and optimized performance'."

    try
        {
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"Getting Do More With Your Solution pillar of SfMC rewritten by the AI")
            $domorewithyoursolution  = Invoke-MetroAIConversation -AgentId $MetroAgent.id -ConversationId $Conversation.id -UserInput $Prompt -Debug:$false
            Write-Debug ((get-date -Format 'yyyy-MM-dd HH_mm_ss')+' - '+"AI Response ID: $($domorewithyoursolution.ResponseId)")
            Start-Sleep -Milliseconds 500
        }
    catch
        {
            Write-Warning "Error invoking AI conversation for Goals of SfMC. Error: $_"
            $domorewithyoursolution = @{ AssistantText = "Discover new ways your solution can work for you with expert guidance and optimized performance" }
        }

    $GoalsOfSfMC = @{
        AccelerateTimeToValue = $timetovalue.AssistantText
        DriveSolutionReliability = $solutionreliability.AssistantText
        DoMoreWithYourSolution = $domorewithyoursolution.AssistantText
    }

    return $GoalsOfSfMC

}