Public/Azure/Assistants/New-AzureAssistant.ps1
function New-AzureAssistant { [CmdletBinding()] [OutputType([pscustomobject])] param ( # Hidden param, for Set-Assistants cmdlet [Parameter(DontShow = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Object]$InputObject, [Parameter()] [ValidateLength(0, 256)] [string]$Name, [Parameter(Mandatory = $true)] [Alias('Model')] [string]$Deployment, [Parameter()] [ValidateLength(0, 512)] [string]$Description, [Parameter()] [ValidateLength(0, 32768)] [string]$Instructions, [Parameter()] [AllowEmptyCollection()] [System.Collections.IDictionary[]]$Tools, [Parameter()] [switch]$UseCodeInterpreter, [Parameter()] [switch]$UseRetrieval, # [Parameter()] # [switch]$UseFunction, [Parameter()] [Alias('file_ids')] [ValidateRange(0, 20)] [string[]]$FileId, [Parameter()] [System.Collections.IDictionary]$MetaData, [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 $Parameters.Model = $Deployment $null = $Parameters.Remove('Deployment') # Invoke $steppablePipeline = { PSOpenAI\New-Assistant @Parameters }.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } process { $steppablePipeline.Process($PSItem) } end { $steppablePipeline.End() } } |