@xsai/embed 0.4.0-beta.8 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { WithUnknown, CommonRequestOptions } from '@xsai/shared';
|
|
2
2
|
|
|
3
3
|
interface EmbedOptions extends CommonRequestOptions {
|
|
4
|
+
/** The number of dimensions the resulting output embeddings should have. */
|
|
5
|
+
dimensions?: number;
|
|
6
|
+
/** Input text to embed. */
|
|
4
7
|
input: string;
|
|
5
8
|
}
|
|
6
9
|
interface EmbedResponse {
|
|
@@ -10,7 +13,7 @@ interface EmbedResponse {
|
|
|
10
13
|
object: 'embedding';
|
|
11
14
|
}[];
|
|
12
15
|
model: string;
|
|
13
|
-
object: 'list'
|
|
16
|
+
object: 'list';
|
|
14
17
|
system_fingerprint?: string;
|
|
15
18
|
usage: EmbedResponseUsage;
|
|
16
19
|
}
|
|
@@ -25,7 +28,8 @@ interface EmbedResult {
|
|
|
25
28
|
}
|
|
26
29
|
declare const embed: (options: WithUnknown<EmbedOptions>) => Promise<EmbedResult>;
|
|
27
30
|
|
|
28
|
-
interface EmbedManyOptions extends
|
|
31
|
+
interface EmbedManyOptions extends Omit<EmbedOptions, 'input'> {
|
|
32
|
+
/** Input text to embed. */
|
|
29
33
|
input: string[];
|
|
30
34
|
}
|
|
31
35
|
interface EmbedManyResult {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsai/embed",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.0
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "extra-small AI SDK.",
|
|
6
6
|
"author": "Moeru AI",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xsai/shared": "~0.4.0
|
|
32
|
+
"@xsai/shared": "~0.4.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "pkgroll",
|