jbilcke-hf HF staff commited on
Commit
013e696
1 Parent(s): 203cc67

limit size

Browse files
Files changed (1) hide show
  1. src/app/api/v1/create/index.ts +3 -1
src/app/api/v1/create/index.ts CHANGED
@@ -24,7 +24,9 @@ export async function create(request: {
24
  height: 576,
25
  turbo: false,
26
  }): Promise<ClapProject> {
27
- const prompt = `${request?.prompt || ""}`.trim()
 
 
28
 
29
  console.log("api/v1/create(): request:", request)
30
 
 
24
  height: 576,
25
  turbo: false,
26
  }): Promise<ClapProject> {
27
+
28
+ // we limit to 512 characters
29
+ const prompt = `${request?.prompt || ""}`.trim().slice(0, 512)
30
 
31
  console.log("api/v1/create(): request:", request)
32