Skip to content

Remove-DifyDocument

Warning

This help was primarily created by a generative AI. It may contain partially inaccurate expressions.

SYNOPSIS

Deletes documents from a Dify knowledge base.

SYNTAX

Remove-DifyDocument [[-Document] <PSObject[]>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The Remove-DifyDocument cmdlet removes specified documents from a Dify knowledge. You can specify the documents to be removed directly, or pipe them from other cmdlets like Get-DifyDocument.

NOTE: This help was primarily created by a generative AI. It may contain partially inaccurate expressions.

EXAMPLES

Example 1

Get-DifyKnowledge -Name "..." | Get-DifyDocument | Remove-DifyDocument

Retrieve documents from a knowledge base and remove them directly.

Example 2

$DocumentsToBeRemoved = Get-DifyKnowledge -Name "..." | Get-DifyDocument
Remove-DifyDocument -Document $DocumentsToBeRemoved

Store documents in a variable before removing them.

PARAMETERS

-Document

Specifies the documents to be removed. This parameter accepts an array of document objects, which can be piped from other cmdlets like Get-DifyDocument.

Type: PSObject[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

CommonParameters

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

INPUTS

System.Management.Automation.PSObject[]

OUTPUTS

System.Object

NOTES