@coreviz/sdk 1.0.10 → 1.0.11
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/coreviz.js +4 -4
- package/package.json +1 -1
package/dist/coreviz.js
CHANGED
|
@@ -67,7 +67,7 @@ class CoreViz {
|
|
|
67
67
|
}
|
|
68
68
|
async describe(image, options) {
|
|
69
69
|
try {
|
|
70
|
-
const resizedImage = await (0, resize_1.resize)(image);
|
|
70
|
+
const resizedImage = await (0, resize_1.resize)(image, 512, 512);
|
|
71
71
|
const headers = this.getHeaders();
|
|
72
72
|
const response = await fetch(`https://lab.coreviz.io/api/ai/describe`, {
|
|
73
73
|
method: 'POST',
|
|
@@ -83,7 +83,7 @@ class CoreViz {
|
|
|
83
83
|
}
|
|
84
84
|
async edit(image, options) {
|
|
85
85
|
try {
|
|
86
|
-
const resizedImage = await (0, resize_1.resize)(image);
|
|
86
|
+
const resizedImage = await (0, resize_1.resize)(image, 1024, 1024);
|
|
87
87
|
const headers = this.getHeaders();
|
|
88
88
|
const response = await fetch(`https://lab.coreviz.io/api/ai/edit`, {
|
|
89
89
|
method: 'POST',
|
|
@@ -109,7 +109,7 @@ class CoreViz {
|
|
|
109
109
|
return this.tagLocal(image, options);
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
|
-
const resizedImage = await (0, resize_1.resize)(image);
|
|
112
|
+
const resizedImage = await (0, resize_1.resize)(image, 512, 512);
|
|
113
113
|
const headers = this.getHeaders();
|
|
114
114
|
const response = await fetch("https://lab.coreviz.io/api/ai/tag", {
|
|
115
115
|
method: 'POST',
|
|
@@ -259,7 +259,7 @@ Output:
|
|
|
259
259
|
isImage = input.startsWith('data:image') || input.startsWith('http://') || input.startsWith('https://');
|
|
260
260
|
}
|
|
261
261
|
if (isImage) {
|
|
262
|
-
const resizedImage = await (0, resize_1.resize)(input);
|
|
262
|
+
const resizedImage = await (0, resize_1.resize)(input, 512, 512);
|
|
263
263
|
body.image = resizedImage;
|
|
264
264
|
}
|
|
265
265
|
else {
|