0
v-firecrawl/apps/test-suite/utils/log.ts

11 lines
416 B
TypeScript
Raw Normal View History

2024-05-08 14:38:46 -04:00
import { supabase_service } from "./supabase";
import { WebsiteScrapeError } from "./types";
export async function logErrors(dataError: WebsiteScrapeError[], time_taken: number, num_tokens:number, score: number) {
try {
await supabase_service.from("test_suite_logs").insert([{log:dataError, time_taken, num_tokens, score}]);
} catch (error) {
console.error(`Error logging to supabase: ${error}`);
}
}