Skip to content

Commit 07c50e3

Browse files
authored
Merge pull request #1218 from ndisidore/nathan/vectorize-generic-preset
VS-18: make Vectorize index preset a generic string
2 parents d34a4bb + 8fb70a4 commit 07c50e3

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

src/cloudflare/internal/vectorize.d.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ interface VectorizeError {
2727
error: string;
2828
}
2929

30-
/**
31-
* A pre-configured list of known models.
32-
* These can be supplied in place of configuring explicit dimensions.
33-
*/
34-
type VectorizePreset =
35-
| "openapi-text-embedding-ada-002"
36-
| "workers-ai/bge-small-en"
37-
| "cohere/embed-multilingual-v2.0";
38-
3930
/**
4031
* Supported distance metrics for an index.
4132
* Distance metrics determine how other "similar" vectors are determined.
@@ -57,7 +48,7 @@ type VectorizeIndexConfig =
5748
metric: VectorizeDistanceMetric;
5849
}
5950
| {
60-
preset: VectorizePreset;
51+
preset: string; // keep this generic, as we'll be adding more presets in the future and this is only in a read capacity
6152
};
6253

6354
/**

types/defines/vectorize.d.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ interface VectorizeError {
1919
error: string;
2020
}
2121

22-
/**
23-
* A pre-configured list of known models.
24-
* These can be supplied in place of configuring explicit dimensions.
25-
*/
26-
type VectorizePreset =
27-
| "openapi-text-embedding-ada-002"
28-
| "workers-ai/bge-small-en"
29-
| "cohere/embed-multilingual-v2.0";
30-
3122
/**
3223
* Supported distance metrics for an index.
3324
* Distance metrics determine how other "similar" vectors are determined.
@@ -49,7 +40,7 @@ type VectorizeIndexConfig =
4940
metric: VectorizeDistanceMetric;
5041
}
5142
| {
52-
preset: VectorizePreset;
43+
preset: string; // keep this generic, as we'll be adding more presets in the future and this is only in a read capacity
5344
};
5445

5546
/**

0 commit comments

Comments
 (0)