Skip to content

Commit 8a203d8

Browse files
committed
model fix
1 parent da4a724 commit 8a203d8

7 files changed

Lines changed: 1026 additions & 138 deletions

File tree

app/api/extract-tasks/route.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Rules:
5656

5757
export async function POST(request: Request) {
5858
const requestId = crypto.randomUUID()
59+
const startTime = Date.now()
5960

6061
try {
6162
const supabase = await createClient()
@@ -260,6 +261,18 @@ export async function POST(request: Request) {
260261
if (!enrichError) enrichmentsApplied++
261262
}
262263

264+
void supabase.from('api_logs').insert({
265+
user_id: user.id,
266+
brain_dump_id: brainDump.id,
267+
endpoint: 'extract-tasks',
268+
model: HF_MODEL,
269+
content_length: content.length,
270+
tasks_extracted: output.tasks.length,
271+
enrichments_applied: enrichmentsApplied,
272+
duration_ms: Date.now() - startTime,
273+
success: true,
274+
})
275+
263276
return Response.json({
264277
success: true,
265278
tasksExtracted: output.tasks.length,

0 commit comments

Comments
 (0)