@doclo/flows 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -605,6 +605,9 @@ type ParseConfig = {
|
|
|
605
605
|
onTie?: 'random' | 'fail' | 'retry';
|
|
606
606
|
};
|
|
607
607
|
maxTokens?: number;
|
|
608
|
+
promptRef?: string;
|
|
609
|
+
promptVariables?: Record<string, any>;
|
|
610
|
+
additionalInstructions?: string;
|
|
608
611
|
};
|
|
609
612
|
type ExtractConfig = {
|
|
610
613
|
type: 'extract';
|
|
@@ -617,10 +620,14 @@ type ExtractConfig = {
|
|
|
617
620
|
};
|
|
618
621
|
reasoning?: {
|
|
619
622
|
enabled?: boolean;
|
|
620
|
-
effort?: '
|
|
623
|
+
effort?: 'xhigh' | 'high' | 'medium' | 'low' | 'minimal' | 'none';
|
|
621
624
|
max_tokens?: number;
|
|
625
|
+
exclude?: boolean;
|
|
622
626
|
};
|
|
623
627
|
maxTokens?: number;
|
|
628
|
+
promptRef?: string;
|
|
629
|
+
promptVariables?: Record<string, any>;
|
|
630
|
+
additionalInstructions?: string;
|
|
624
631
|
};
|
|
625
632
|
type SplitConfig = {
|
|
626
633
|
type: 'split';
|
|
@@ -656,6 +663,8 @@ type CategorizeConfig = {
|
|
|
656
663
|
onTie?: 'random' | 'fail' | 'retry';
|
|
657
664
|
};
|
|
658
665
|
promptRef?: string;
|
|
666
|
+
promptVariables?: Record<string, any>;
|
|
667
|
+
additionalInstructions?: string;
|
|
659
668
|
maxTokens?: number;
|
|
660
669
|
};
|
|
661
670
|
type TriggerConfig = {
|
package/dist/index.js
CHANGED
|
@@ -2036,7 +2036,10 @@ function createNodeFromConfig(nodeType, config, providers, flows) {
|
|
|
2036
2036
|
return parse({
|
|
2037
2037
|
provider,
|
|
2038
2038
|
consensus: cfg.consensus,
|
|
2039
|
-
maxTokens: cfg.maxTokens
|
|
2039
|
+
maxTokens: cfg.maxTokens,
|
|
2040
|
+
promptRef: cfg.promptRef,
|
|
2041
|
+
promptVariables: cfg.promptVariables,
|
|
2042
|
+
additionalInstructions: cfg.additionalInstructions
|
|
2040
2043
|
});
|
|
2041
2044
|
}
|
|
2042
2045
|
case "extract": {
|
|
@@ -2046,7 +2049,10 @@ function createNodeFromConfig(nodeType, config, providers, flows) {
|
|
|
2046
2049
|
schema: cfg.schema,
|
|
2047
2050
|
consensus: cfg.consensus,
|
|
2048
2051
|
reasoning: cfg.reasoning,
|
|
2049
|
-
maxTokens: cfg.maxTokens
|
|
2052
|
+
maxTokens: cfg.maxTokens,
|
|
2053
|
+
promptRef: cfg.promptRef,
|
|
2054
|
+
promptVariables: cfg.promptVariables,
|
|
2055
|
+
additionalInstructions: cfg.additionalInstructions
|
|
2050
2056
|
});
|
|
2051
2057
|
}
|
|
2052
2058
|
case "split": {
|
|
@@ -2068,7 +2074,10 @@ function createNodeFromConfig(nodeType, config, providers, flows) {
|
|
|
2068
2074
|
provider,
|
|
2069
2075
|
categories: cfg.categories,
|
|
2070
2076
|
consensus: cfg.consensus,
|
|
2071
|
-
maxTokens: cfg.maxTokens
|
|
2077
|
+
maxTokens: cfg.maxTokens,
|
|
2078
|
+
promptRef: cfg.promptRef,
|
|
2079
|
+
promptVariables: cfg.promptVariables,
|
|
2080
|
+
additionalInstructions: cfg.additionalInstructions
|
|
2072
2081
|
});
|
|
2073
2082
|
}
|
|
2074
2083
|
default:
|
|
@@ -2493,11 +2502,12 @@ function validateFlow(flowDef, options = {}) {
|
|
|
2493
2502
|
}
|
|
2494
2503
|
}
|
|
2495
2504
|
if (cfg.reasoning) {
|
|
2496
|
-
|
|
2505
|
+
const validEfforts = ["xhigh", "high", "medium", "low", "minimal", "none"];
|
|
2506
|
+
if (cfg.reasoning.effort && !validEfforts.includes(cfg.reasoning.effort)) {
|
|
2497
2507
|
errors.push({
|
|
2498
2508
|
type: "invalid_config",
|
|
2499
2509
|
stepId,
|
|
2500
|
-
message: `Invalid reasoning effort: ${cfg.reasoning.effort}. Must be:
|
|
2510
|
+
message: `Invalid reasoning effort: ${cfg.reasoning.effort}. Must be one of: ${validEfforts.join(", ")}`
|
|
2501
2511
|
});
|
|
2502
2512
|
}
|
|
2503
2513
|
}
|