feat: add is LLM entry
This commit is contained in:
@@ -1001,6 +1001,7 @@ async function executeRun(id: string, userId: string, requestedFormats?: string[
|
||||
schemaItemsExtracted: totalSchemaItemsExtracted,
|
||||
listItemsExtracted: totalListItemsExtracted,
|
||||
extractedScreenshotsCount,
|
||||
is_llm: (recording.recording_meta as any).isLLM,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1121,15 +1122,16 @@ async function executeRun(id: string, userId: string, requestedFormats?: string[
|
||||
} catch (webhookError: any) {
|
||||
logger.log('error', `Failed to send failure webhooks for run ${run.runId}: ${webhookError.message}`);
|
||||
}
|
||||
capture(
|
||||
'maxun-oss-run-created-api',
|
||||
{
|
||||
runId: id,
|
||||
created_at: new Date().toISOString(),
|
||||
status: 'failed',
|
||||
is_llm: (recording?.recording_meta as any)?.isLLM,
|
||||
}
|
||||
);
|
||||
}
|
||||
capture(
|
||||
'maxun-oss-run-created-api',
|
||||
{
|
||||
runId: id,
|
||||
created_at: new Date().toISOString(),
|
||||
status: 'failed',
|
||||
}
|
||||
);
|
||||
return {
|
||||
success: false,
|
||||
error: error.message,
|
||||
|
||||
@@ -677,6 +677,7 @@ router.post("/sdk/extract/llm", requireAPIKey, async (req: AuthenticatedRequest,
|
||||
params: [],
|
||||
type: 'extract',
|
||||
url: workflowResult.url,
|
||||
isLLM: true,
|
||||
};
|
||||
|
||||
const robot = await Robot.create({
|
||||
|
||||
@@ -12,6 +12,7 @@ interface RobotMeta {
|
||||
type?: 'extract' | 'scrape';
|
||||
url?: string;
|
||||
formats?: ('markdown' | 'html' | 'screenshot-visible' | 'screenshot-fullpage')[];
|
||||
isLLM?: boolean;
|
||||
}
|
||||
|
||||
interface RobotWorkflow {
|
||||
|
||||
@@ -538,6 +538,7 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
||||
schemaItemsExtracted: totalSchemaItemsExtracted,
|
||||
listItemsExtracted: totalListItemsExtracted,
|
||||
extractedScreenshotsCount,
|
||||
is_llm: (recording.recording_meta as any).isLLM,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -703,6 +704,7 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
||||
error_message: executionError.message,
|
||||
partial_data_extracted: partialDataExtracted,
|
||||
totalRowsExtracted: partialData?.totalSchemaItemsExtracted + partialData?.totalListItemsExtracted + partialData?.extractedScreenshotsCount || 0,
|
||||
is_llm: (recording?.recording_meta as any)?.isLLM,
|
||||
});
|
||||
|
||||
try {
|
||||
|
||||
@@ -573,6 +573,7 @@ router.post('/recordings/llm', requireSignIn, async (req: AuthenticatedRequest,
|
||||
params: [],
|
||||
type: 'extract',
|
||||
url: workflowResult.url || url,
|
||||
isLLM: true,
|
||||
},
|
||||
recording: { workflow: workflowResult.workflow },
|
||||
google_sheet_email: null,
|
||||
|
||||
@@ -536,6 +536,7 @@ async function executeRun(id: string, userId: string) {
|
||||
schemaItemsExtracted: totalSchemaItemsExtracted,
|
||||
listItemsExtracted: totalListItemsExtracted,
|
||||
extractedScreenshotsCount,
|
||||
is_llm: (recording.recording_meta as any).isLLM,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -650,15 +651,16 @@ async function executeRun(id: string, userId: string) {
|
||||
} catch (socketError: any) {
|
||||
logger.log('warn', `Failed to emit failure event in main catch: ${socketError.message}`);
|
||||
}
|
||||
capture(
|
||||
'maxun-oss-run-created-scheduled',
|
||||
{
|
||||
runId: id,
|
||||
created_at: new Date().toISOString(),
|
||||
status: 'failed',
|
||||
is_llm: (recording?.recording_meta as any)?.isLLM,
|
||||
}
|
||||
);
|
||||
}
|
||||
capture(
|
||||
'maxun-oss-run-created-scheduled',
|
||||
{
|
||||
runId: id,
|
||||
created_at: new Date().toISOString(),
|
||||
status: 'failed',
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user