-
Notifications
You must be signed in to change notification settings - Fork 29
Get OAIFileContent
Retrieves the content of a file from the OpenAI API.
Get-OAIFileContent [-FileId] <Object> [[-ContentType] <Object>] [[-OutFile] <Object>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The Get-OAIFileContent function retrieves the content of a file from the OpenAI API using the specified FileId. The content can be returned as plain text or in a specified content type. Optionally, the content can be saved to a file.
Get-OAIFileContent -FileId "abc123" -ContentType "application/json" -OutFile "C:\output.json"
Retrieves the content of the file with ID "abc123" from the OpenAI API as JSON and saves it to "C:\output.json".
The ID of the file to retrieve the content from.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe type of content to retrieve. The default value is "text/plain".
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Text/plain
Accept pipeline input: False
Accept wildcard characters: FalseThe path to save the content to. If specified, the content will be saved to the specified file.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
https://platform.openai.com/docs/api-reference/files/retrieve-contents