feat(fetch-requests): support llama_parse pipeline
- Fix PipelineType union: "llama_parser" → "llama_parse" (matches backend enum) - Add "llama_extract" to SSEEventStep union - PipelineStepper: advance Extract stage on llama_extract events Dropdown/badge rendering is OpenAPI-spec-driven and picks the new value up automatically; no other changes required.
This commit is contained in:
@@ -29,7 +29,13 @@ function computeProgressPercent(
|
|||||||
|
|
||||||
let pct = 0;
|
let pct = 0;
|
||||||
|
|
||||||
if (seenSteps.has("raw_lines") || seenSteps.has("txn_blocks")) pct += 10;
|
if (
|
||||||
|
seenSteps.has("raw_lines") ||
|
||||||
|
seenSteps.has("txn_blocks") ||
|
||||||
|
seenSteps.has("llama_extract")
|
||||||
|
) {
|
||||||
|
pct += 10;
|
||||||
|
}
|
||||||
|
|
||||||
if (txnBlockCount > 0) {
|
if (txnBlockCount > 0) {
|
||||||
const current = Math.max(liveCount, stepStats.txn_dicts ?? 0);
|
const current = Math.max(liveCount, stepStats.txn_dicts ?? 0);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export interface EmailSource {
|
|||||||
txn_dicts_count?: number;
|
txn_dicts_count?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PipelineType = "heuristic" | "llm" | "llama_parser";
|
export type PipelineType = "heuristic" | "llm" | "llama_parse";
|
||||||
|
|
||||||
export interface FetchRequestCreate {
|
export interface FetchRequestCreate {
|
||||||
source: FileSource | EmailSource;
|
source: FileSource | EmailSource;
|
||||||
@@ -90,7 +90,7 @@ export interface ResolveAmbiguityPayload {
|
|||||||
export type SSEEventStep =
|
export type SSEEventStep =
|
||||||
| "load_content" | "raw_lines" | "txn_blocks" | "txn_dicts"
|
| "load_content" | "raw_lines" | "txn_blocks" | "txn_dicts"
|
||||||
| "resume_extract" | "extract" | "paused" | "complete" | "enrich"
|
| "resume_extract" | "extract" | "paused" | "complete" | "enrich"
|
||||||
| "save_expenses" | "pipeline";
|
| "save_expenses" | "pipeline" | "llama_extract";
|
||||||
|
|
||||||
export type SSEEventStatus =
|
export type SSEEventStatus =
|
||||||
| "started" | "completed" | "skipped" | "paused" | "progress" | "failed";
|
| "started" | "completed" | "skipped" | "paused" | "progress" | "failed";
|
||||||
|
|||||||
Reference in New Issue
Block a user