File size: 581 Bytes
f27679f
1185ec1
f27679f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

import { VideoInfo } from "@/types/general"

import { deleteFileFromDataset } from "./deleteFileFromDataset"
import { formatPromptFileName } from "../utils/formatPromptFileName"

export async function deleteVideoRequest({
  video,
  apiKey,
  neverThrow,
}: {
   video: VideoInfo
   apiKey: string
   neverThrow?: boolean
}): Promise<boolean> {
  const repo = `datasets/${video.channel.datasetUser}/${video.channel.datasetName}`
  const { fileName } = formatPromptFileName(video.id)
  return deleteFileFromDataset({
    repo,
    path: fileName,
    apiKey,
    neverThrow,
  })
}