@xsai/embed 0.0.15 → 0.0.16
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.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { requestBody, requestHeaders } from '@xsai/shared';
|
|
2
2
|
|
|
3
|
-
const embed = async (options) => await fetch(options.
|
|
3
|
+
const embed = async (options) => await fetch(new URL("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 fetch(options.url, {
|
|
|
14
14
|
usage
|
|
15
15
|
}));
|
|
16
16
|
|
|
17
|
-
const embedMany = async (options) => await fetch(options.
|
|
17
|
+
const embedMany = async (options) => await fetch(new URL("embeddings", options.baseURL), {
|
|
18
18
|
body: requestBody(options),
|
|
19
19
|
headers: requestHeaders({
|
|
20
20
|
"Content-Type": "application/json",
|