@xsai/embed 0.0.22 → 0.0.23

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 +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { requestBody, requestHeaders } from '@xsai/shared';
1
+ import { requestURL, requestBody, requestHeaders } from '@xsai/shared';
2
2
 
3
- const embed = async (options) => await (options.fetch ?? globalThis.fetch)(new URL("embeddings", options.baseURL), {
3
+ const embed = async (options) => await (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)(new U
14
14
  usage
15
15
  }));
16
16
 
17
- const embedMany = async (options) => await (options.fetch ?? globalThis.fetch)(new URL("embeddings", options.baseURL), {
17
+ const embedMany = async (options) => await (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,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsai/embed",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "author": "Moeru AI",
6
6
  "license": "MIT",