@vertesia/workflow 0.76.0 → 0.78.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/workflow",
3
- "version": "0.76.0",
3
+ "version": "0.78.0",
4
4
  "type": "module",
5
5
  "description": "Vertesia workflow DSL",
6
6
  "main": "./lib/esm/index.js",
@@ -49,11 +49,11 @@
49
49
  "tmp": "^0.2.3",
50
50
  "tmp-promise": "^3.0.3",
51
51
  "yaml": "^2.6.0",
52
+ "@vertesia/client": "0.78.0",
52
53
  "@llumiverse/common": "0.22.0",
53
- "@vertesia/client": "0.76.0",
54
- "@vertesia/api-fetch-client": "0.76.0",
55
- "@vertesia/common": "0.76.0",
56
- "@vertesia/memory": "0.47.0"
54
+ "@vertesia/api-fetch-client": "0.78.0",
55
+ "@vertesia/common": "0.78.0",
56
+ "@vertesia/memory": "0.49.0"
57
57
  },
58
58
  "ts_dual_module": {
59
59
  "outDir": "lib",
@@ -20,8 +20,14 @@ const {
20
20
  export async function recalculateEmbeddingsWorkflow(payload: WorkflowExecutionPayload) {
21
21
 
22
22
  const embeddings = [];
23
+ const payloadType = payload.vars?.type as SupportedEmbeddingTypes;
23
24
 
24
- for (const type of Object.values(SupportedEmbeddingTypes)) {
25
+ if (payloadType && !Object.values(SupportedEmbeddingTypes).includes(payloadType)) {
26
+ throw new Error("Embedding type must be text, image, or properties");
27
+ }
28
+ const types = payloadType ? [payloadType] : Object.values(SupportedEmbeddingTypes);
29
+
30
+ for (const type of types) {
25
31
  embeddings.push(generateEmbeddings(payload, {
26
32
  force: true,
27
33
  type