vectocore4 0.0.31 → 0.0.33
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/cjs/index.js +20 -14
- package/dist/index.d.ts +16 -3
- package/dist/mjs/index.js +17 -11
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -436,12 +436,14 @@ class AIMS {
|
|
|
436
436
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
437
437
|
* - `stream: false` 인 경우: JSON 데이터
|
|
438
438
|
*/
|
|
439
|
-
keypoint(
|
|
440
|
-
return __awaiter(this,
|
|
439
|
+
keypoint(_a) {
|
|
440
|
+
return __awaiter(this, arguments, void 0, function* ({ text, stream }) {
|
|
441
441
|
const requestParam = {
|
|
442
442
|
command: "keywords",
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
params: {
|
|
444
|
+
text: text,
|
|
445
|
+
stream: stream !== null && stream !== void 0 ? stream : true,
|
|
446
|
+
},
|
|
445
447
|
};
|
|
446
448
|
const response = yield this.request(requestParam);
|
|
447
449
|
if (stream) {
|
|
@@ -460,12 +462,14 @@ class AIMS {
|
|
|
460
462
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
461
463
|
* - `stream: false` 인 경우: JSON 데이터
|
|
462
464
|
*/
|
|
463
|
-
imCap(
|
|
464
|
-
return __awaiter(this,
|
|
465
|
+
imCap(_a) {
|
|
466
|
+
return __awaiter(this, arguments, void 0, function* ({ imageUrl, stream }) {
|
|
465
467
|
const requestParam = {
|
|
466
|
-
command: "
|
|
467
|
-
|
|
468
|
-
|
|
468
|
+
command: "im_cap",
|
|
469
|
+
params: {
|
|
470
|
+
image_url: imageUrl,
|
|
471
|
+
stream: stream !== null && stream !== void 0 ? stream : true,
|
|
472
|
+
},
|
|
469
473
|
};
|
|
470
474
|
const response = yield this.request(requestParam);
|
|
471
475
|
if (stream) {
|
|
@@ -485,13 +489,15 @@ class AIMS {
|
|
|
485
489
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
486
490
|
* - `stream: false` 인 경우: JSON 데이터
|
|
487
491
|
*/
|
|
488
|
-
translate(
|
|
489
|
-
return __awaiter(this,
|
|
492
|
+
translate(_a) {
|
|
493
|
+
return __awaiter(this, arguments, void 0, function* ({ language, text, stream }) {
|
|
490
494
|
const requestParam = {
|
|
491
495
|
command: "translate",
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
496
|
+
params: {
|
|
497
|
+
language: language,
|
|
498
|
+
text: text,
|
|
499
|
+
stream: stream !== null && stream !== void 0 ? stream : true,
|
|
500
|
+
},
|
|
495
501
|
};
|
|
496
502
|
const response = yield this.request(requestParam);
|
|
497
503
|
if (stream) {
|
package/dist/index.d.ts
CHANGED
|
@@ -323,6 +323,19 @@ export declare class Lens {
|
|
|
323
323
|
chat({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }: LensChatParams): Promise<any>;
|
|
324
324
|
jsonAutoComplete(jsonString: string): string | null;
|
|
325
325
|
}
|
|
326
|
+
export interface KeypointParams {
|
|
327
|
+
text: string;
|
|
328
|
+
stream?: boolean;
|
|
329
|
+
}
|
|
330
|
+
export interface ImCapParams {
|
|
331
|
+
imageUrl: string;
|
|
332
|
+
stream?: boolean;
|
|
333
|
+
}
|
|
334
|
+
export interface TranslateParams {
|
|
335
|
+
language: string;
|
|
336
|
+
text: string;
|
|
337
|
+
stream?: boolean | undefined;
|
|
338
|
+
}
|
|
326
339
|
export declare class AIMS {
|
|
327
340
|
tenantKey: string | undefined;
|
|
328
341
|
baseURL: string;
|
|
@@ -341,7 +354,7 @@ export declare class AIMS {
|
|
|
341
354
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
342
355
|
* - `stream: false` 인 경우: JSON 데이터
|
|
343
356
|
*/
|
|
344
|
-
keypoint(text
|
|
357
|
+
keypoint({ text, stream }: KeypointParams): Promise<any>;
|
|
345
358
|
/**
|
|
346
359
|
* ImCap AI 에이전트는 이미지를 AI로 분석하여 캡셔닝하는 AI 에이전트 입니다.
|
|
347
360
|
* @param imageUrl: string (필수) 설명을 추출할 이미지의 URL
|
|
@@ -350,7 +363,7 @@ export declare class AIMS {
|
|
|
350
363
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
351
364
|
* - `stream: false` 인 경우: JSON 데이터
|
|
352
365
|
*/
|
|
353
|
-
imCap(imageUrl
|
|
366
|
+
imCap({ imageUrl, stream }: ImCapParams): Promise<any>;
|
|
354
367
|
/**
|
|
355
368
|
* Translate는 AI 번역을 제공하는 AI 에이전트 입니다.
|
|
356
369
|
* @param language : (필수) 번역할 국가의 언어명(korean, english, Spanish ...)
|
|
@@ -360,7 +373,7 @@ export declare class AIMS {
|
|
|
360
373
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
361
374
|
* - `stream: false` 인 경우: JSON 데이터
|
|
362
375
|
*/
|
|
363
|
-
translate(language
|
|
376
|
+
translate({ language, text, stream }: TranslateParams): Promise<any>;
|
|
364
377
|
jsonAutoComplete(jsonString: string): string | null;
|
|
365
378
|
}
|
|
366
379
|
export {};
|
package/dist/mjs/index.js
CHANGED
|
@@ -396,11 +396,13 @@ export class AIMS {
|
|
|
396
396
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
397
397
|
* - `stream: false` 인 경우: JSON 데이터
|
|
398
398
|
*/
|
|
399
|
-
async keypoint(text, stream) {
|
|
399
|
+
async keypoint({ text, stream }) {
|
|
400
400
|
const requestParam = {
|
|
401
401
|
command: "keywords",
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
params: {
|
|
403
|
+
text: text,
|
|
404
|
+
stream: stream ?? true,
|
|
405
|
+
},
|
|
404
406
|
};
|
|
405
407
|
const response = await this.request(requestParam);
|
|
406
408
|
if (stream) {
|
|
@@ -418,11 +420,13 @@ export class AIMS {
|
|
|
418
420
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
419
421
|
* - `stream: false` 인 경우: JSON 데이터
|
|
420
422
|
*/
|
|
421
|
-
async imCap(imageUrl, stream) {
|
|
423
|
+
async imCap({ imageUrl, stream }) {
|
|
422
424
|
const requestParam = {
|
|
423
|
-
command: "
|
|
424
|
-
|
|
425
|
-
|
|
425
|
+
command: "im_cap",
|
|
426
|
+
params: {
|
|
427
|
+
image_url: imageUrl,
|
|
428
|
+
stream: stream ?? true,
|
|
429
|
+
},
|
|
426
430
|
};
|
|
427
431
|
const response = await this.request(requestParam);
|
|
428
432
|
if (stream) {
|
|
@@ -441,12 +445,14 @@ export class AIMS {
|
|
|
441
445
|
* - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
|
|
442
446
|
* - `stream: false` 인 경우: JSON 데이터
|
|
443
447
|
*/
|
|
444
|
-
async translate(language, text, stream) {
|
|
448
|
+
async translate({ language, text, stream }) {
|
|
445
449
|
const requestParam = {
|
|
446
450
|
command: "translate",
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
451
|
+
params: {
|
|
452
|
+
language: language,
|
|
453
|
+
text: text,
|
|
454
|
+
stream: stream ?? true,
|
|
455
|
+
},
|
|
450
456
|
};
|
|
451
457
|
const response = await this.request(requestParam);
|
|
452
458
|
if (stream) {
|