mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-10 05:42:58 +00:00
bugfix(node): make WriteMode optional when specifying embeddings (#336)
This commit is contained in:
@@ -26,3 +26,9 @@ export interface EmbeddingFunction<T> {
|
||||
*/
|
||||
embed: (data: T[]) => Promise<number[][]>
|
||||
}
|
||||
|
||||
export function isEmbeddingFunction<T> (value: any): value is EmbeddingFunction<T> {
|
||||
return Object.keys(value).length === 2 &&
|
||||
typeof value.sourceColumn === 'string' &&
|
||||
typeof value.embed === 'function'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user