Public/Azure/Assistants/Get-AzureAssistant.ps1
function Get-AzureAssistant { [CmdletBinding(DefaultParameterSetName = 'List')] [OutputType([pscustomobject])] param ( [Parameter(ParameterSetName = 'Get', Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Alias('assistant_id')] [Alias('Assistant')] [ValidateScript({ ($_ -is [string] -and $_.StartsWith('asst_')) -or ` ($_.id -is [string] -and $_.id.StartsWith('asst_')) -or ` ($_.assistant_id -is [string] -and $_.assistant_id.StartsWith('asst_')) })] [Object]$InputObject, [Parameter(ParameterSetName = 'List')] [ValidateRange(1, 100)] [int]$Limit = 20, [Parameter(ParameterSetName = 'ListAll')] [switch]$All, [Parameter(ParameterSetName = 'ListAll', DontShow = $true)] [string]$After, [Parameter(ParameterSetName = 'ListAll', DontShow = $true)] [string]$Before, [Parameter(ParameterSetName = 'List')] [Parameter(ParameterSetName = 'ListAll')] [ValidateSet('asc', 'desc')] [string][LowerCaseTransformation()]$Order = 'asc', [Parameter()] [int]$TimeoutSec = 0, [Parameter()] [ValidateRange(0, 100)] [int]$MaxRetryCount = 0, [Parameter()] [System.Uri]$ApiBase, [Parameter()] [string]$ApiVersion, [Parameter()] [ValidateSet('azure', 'azure_ad')] [string]$AuthType = 'azure', [Parameter()] [securestring][SecureStringTransformation()]$ApiKey, [Parameter()] [System.Collections.IDictionary]$AdditionalQuery, [Parameter()] [System.Collections.IDictionary]$AdditionalHeaders, [Parameter()] [object]$AdditionalBody ) begin { # Construct parameters $Parameters = $PSBoundParameters $Parameters.ApiType = [OpenAIApiType]::Azure $Parameters.AuthType = $AuthType # Invoke $steppablePipeline = { PSOpenAI\Get-Assistant @Parameters }.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } process { $steppablePipeline.Process($PSItem) } end { $steppablePipeline.End() } } |