ai-tube / src /app /api /utils /formatPromptFileName.ts
jbilcke-hf's picture
jbilcke-hf HF staff
working on some new features
3d4392e
raw
history blame
No virus
274 Bytes
import { v4 as uuidv4 } from "uuid"
export function formatPromptFileName(id?: string): { id: string; fileName: string } {
const videoId = typeof id === "string" ? id : uuidv4()
const fileName = `prompt_${videoId}.md`
return {
id: videoId,
fileName
}
}