fix(node): Relax EmbeddingFunction type guard (#370)

This commit is contained in:
gsilvestrin
2023-07-27 12:51:59 -07:00
committed by GitHub
parent 6036cf48a7
commit 73cc12ecc5
2 changed files with 8 additions and 2 deletions

View File

@@ -28,7 +28,6 @@ export interface EmbeddingFunction<T> {
}
export function isEmbeddingFunction<T> (value: any): value is EmbeddingFunction<T> {
return Object.keys(value).length === 2 &&
typeof value.sourceColumn === 'string' &&
return typeof value.sourceColumn === 'string' &&
typeof value.embed === 'function'
}