mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-15 08:12:58 +00:00
fix(nodejs): lancedb arrow dependency (#1458)
previously if you tried to install both vectordb and @lancedb/lancedb, you would get a peer dependency issue due to `vectordb` requiring `14.0.2` and `@lancedb/lancedb` requiring `15.0.0`. now `@lancedb/lancedb` should just work with any arrow version 13-17
This commit is contained in:
@@ -15,10 +15,11 @@
|
||||
import "reflect-metadata";
|
||||
import {
|
||||
DataType,
|
||||
DataTypeLike,
|
||||
Field,
|
||||
FixedSizeList,
|
||||
Float,
|
||||
Float32,
|
||||
FloatLike,
|
||||
type IntoVector,
|
||||
isDataType,
|
||||
isFixedSizeList,
|
||||
@@ -89,8 +90,8 @@ export abstract class EmbeddingFunction<
|
||||
* @see {@link lancedb.LanceSchema}
|
||||
*/
|
||||
sourceField(
|
||||
optionsOrDatatype: Partial<FieldOptions> | DataType,
|
||||
): [DataType, Map<string, EmbeddingFunction>] {
|
||||
optionsOrDatatype: Partial<FieldOptions> | DataTypeLike,
|
||||
): [DataTypeLike, Map<string, EmbeddingFunction>] {
|
||||
let datatype = isDataType(optionsOrDatatype)
|
||||
? optionsOrDatatype
|
||||
: optionsOrDatatype?.datatype;
|
||||
@@ -169,7 +170,7 @@ export abstract class EmbeddingFunction<
|
||||
}
|
||||
|
||||
/** The datatype of the embeddings */
|
||||
abstract embeddingDataType(): Float;
|
||||
abstract embeddingDataType(): FloatLike;
|
||||
|
||||
/**
|
||||
* Creates a vector representation for the given values.
|
||||
|
||||
Reference in New Issue
Block a user