@xsai/embed 0.0.29 → 0.0.31

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { requestURL, requestBody, requestHeaders, responseJSON } from '@xsai/shared';
2
2
 
3
- const embed = async (options) => await (options.fetch ?? globalThis.fetch)(requestURL("embeddings", options.baseURL), {
3
+ const embed = async (options) => (options.fetch ?? globalThis.fetch)(requestURL("embeddings", options.baseURL), {
4
4
  body: requestBody(options),
5
5
  headers: requestHeaders({
6
6
  "Content-Type": "application/json",
@@ -14,7 +14,7 @@ const embed = async (options) => await (options.fetch ?? globalThis.fetch)(reque
14
14
  usage
15
15
  }));
16
16
 
17
- const embedMany = async (options) => await (options.fetch ?? globalThis.fetch)(requestURL("embeddings", options.baseURL), {
17
+ const embedMany = async (options) => (options.fetch ?? globalThis.fetch)(requestURL("embeddings", options.baseURL), {
18
18
  body: requestBody(options),
19
19
  headers: requestHeaders({
20
20
  "Content-Type": "application/json",
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "@xsai/embed",
3
- "version": "0.0.29",
4
3
  "type": "module",
4
+ "version": "0.0.31",
5
+ "description": "extra-small AI SDK for Browser, Node.js, Deno, Bun or Edge Runtime.",
5
6
  "author": "Moeru AI",
6
7
  "license": "MIT",
7
8
  "homepage": "https://xsai.js.org",
8
- "description": "extra-small AI SDK for Browser, Node.js, Deno, Bun or Edge Runtime.",
9
- "keywords": [
10
- "xsai",
11
- "openai",
12
- "ai"
13
- ],
14
9
  "repository": {
15
10
  "type": "git",
16
11
  "url": "git+https://github.com/moeru-ai/xsai.git",
17
12
  "directory": "packages/embed"
18
13
  },
19
14
  "bugs": "https://github.com/moeru-ai/xsai/issues",
15
+ "keywords": [
16
+ "xsai",
17
+ "openai",
18
+ "ai"
19
+ ],
20
20
  "sideEffects": false,
21
- "main": "./dist/index.js",
22
- "types": "./dist/index.d.ts",
23
21
  "exports": {
24
22
  ".": {
25
23
  "types": "./dist/index.d.ts",
26
24
  "default": "./dist/index.js"
27
25
  }
28
26
  },
27
+ "main": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
29
  "files": [
30
30
  "dist"
31
31
  ],