Public/Azure/Runs/Get-AzureThreadRunStep.ps1
function Get-AzureThreadRunStep { [CmdletBinding()] [OutputType([pscustomobject])] param ( [Parameter(ParameterSetName = 'Get_Run', Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [Parameter(ParameterSetName = 'List_Run', Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [Alias('InputObject')] # for backword compatibility [PSTypeName('PSOpenAI.Thread.Run')]$Run, [Parameter(ParameterSetName = 'Get_RunId', Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [Parameter(ParameterSetName = 'List_RunId', Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateNotNullOrEmpty()] [Alias('run_id')] [string][UrlEncodeTransformation()]$RunId, [Parameter(ParameterSetName = 'Get_RunId', Mandatory, Position = 1, ValueFromPipelineByPropertyName)] [Parameter(ParameterSetName = 'List_RunId', Mandatory, Position = 1, ValueFromPipelineByPropertyName)] [ValidateNotNullOrEmpty()] [Alias('thread_id')] [string][UrlEncodeTransformation()]$ThreadId, [Parameter(ParameterSetName = 'Get_Run', Mandatory, Position = 1, ValueFromPipelineByPropertyName)] [Parameter(ParameterSetName = 'Get_RunId', Mandatory, Position = 2, ValueFromPipelineByPropertyName)] [Alias('step_id')] [ValidateNotNullOrEmpty()] [string][UrlEncodeTransformation()]$StepId, [Parameter(ParameterSetName = 'Get_RunStep', Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [PSTypeName('PSOpenAI.Thread.Run.Step')]$Step, [Parameter(ParameterSetName = 'List_Run')] [Parameter(ParameterSetName = 'List_RunId')] [ValidateRange(1, 100)] [int]$Limit = 20, [Parameter(ParameterSetName = 'List_Run')] [Parameter(ParameterSetName = 'List_RunId')] [switch]$All, [Parameter(ParameterSetName = 'List_Run', DontShow)] [Parameter(ParameterSetName = 'List_RunId', DontShow)] [string]$After, [Parameter(ParameterSetName = 'List_Run', DontShow)] [Parameter(ParameterSetName = 'List_RunId', DontShow)] [string]$Before, [Parameter(ParameterSetName = 'List_Run')] [Parameter(ParameterSetName = 'List_RunId')] [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-ThreadRunStep @Parameters }.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } process { $steppablePipeline.Process($PSItem) } end { $steppablePipeline.End() } } |