ai-tube / src /app /api /parsers /parsePrompt.ts
jbilcke-hf's picture
jbilcke-hf HF staff
upgraded to @aitube/client 0.0.12
f24ad59
raw
history blame
No virus
229 Bytes
export function parsePrompt(input?: any) {
let res = ""
try {
res = decodeURIComponent(`${input || ""}` || "").trim()
} catch (err) {}
if (!prompt.length) { throw new Error(`please provide a prompt`) }
return res
}