Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/ai/src/source/ProvenanceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import { sha256 } from "@workglow/util";

import type { VariantProvenance } from "./DocumentSchema";

/**
* Default maximum tokens for chunking when not specified in provenance
*/
const DEFAULT_MAX_TOKENS = 512;

/**
* Extract variant-relevant fields from task-graph provenance
*/
Expand Down Expand Up @@ -79,7 +84,7 @@ function extractNumber(prov: Provenance, ...keys: string[]): number {
}
}
// Default for required field
return 512; // Default maxTokens
return DEFAULT_MAX_TOKENS;
}

/**
Expand Down