Public/CompareAndContrast.ps1

function CompareAndContrast {
    param(
        [Parameter(ValueFromPipeline)]
        $UserInput,
        [Switch]$Chat
    )

    Process { $lines += @($UserInput) } 

    End {
        $instructions = @"
# IDENTITY and PURPOSE
 
Pls be brief. Compare and contrast, pls put it into a markdown table
"@

        if($Chat) {
            'Time to chat'
        } 
        else {
            $lines | Invoke-OAIChat $instructions
        }
    }
}