Skip to content

Invoke OAIUploadFile

dfinke edited this page Apr 20, 2024 · 2 revisions

Invoke-OAIUploadFile

SYNOPSIS

Uploads a file to a specified URL using the OpenAI API.

SYNTAX

Invoke-OAIUploadFile [[-Path] <Object>] [[-Purpose] <Object>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

The Invoke-OAIUploadFile function uploads a file to a specified URL using the OpenAI API. It supports uploading files for fine-tuning or for use with assistants.

EXAMPLES

EXAMPLE 1

Invoke-OAIUploadFile -Path 'C:\Files\my_file.txt' -Purpose 'fine-tune'
Uploads the file 'my_file.txt' for fine-tuning using the OpenAI API.

EXAMPLE 2

Get-ChildItem 'C:\Files' | Invoke-OAIUploadFile -Purpose 'assistants'
Uploads all files in the 'C:\Files' directory for use with assistants using the OpenAI API.

PARAMETERS

-Path

Specifies the path of the file to upload. This parameter accepts pipeline input by property name.

Type: Object
Parameter Sets: (All)
Aliases: FullName

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Purpose

Specifies the purpose of the file upload. Valid values are 'fine-tune' and 'assistants'. The default value is 'assistants'.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: Assistants
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Clone this wiki locally