Skip to content

Commit d580925

Browse files
authored
Update query-combined.js
1 parent 314c484 commit d580925

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doctests/query-combined.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ async function embedText(sentence) {
2121
normalize: true,
2222
});
2323

24-
const embedding = Object.values(vectorOutput?.data);
24+
if (vectorOutput == null) {
25+
throw new Error('vectorOutput is undefined');
26+
}
27+
28+
const embedding = Object.values(vectorOutput.data);
2529

2630
return embedding;
2731
}

0 commit comments

Comments
 (0)