vectocore4 0.0.32 → 0.0.34

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 CHANGED
@@ -298,12 +298,12 @@ class Lens {
298
298
  });
299
299
  }
300
300
  chat(_a) {
301
- return __awaiter(this, arguments, void 0, function* ({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
301
+ return __awaiter(this, arguments, void 0, function* ({ question, stream = true, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
302
302
  const requestParam = {
303
303
  command: "lens_chat",
304
304
  params: {
305
305
  question: question,
306
- stream: stream !== null && stream !== void 0 ? stream : true,
306
+ stream: stream,
307
307
  },
308
308
  };
309
309
  if (model)
@@ -436,12 +436,14 @@ class AIMS {
436
436
  * - `stream: true` 인 경우: 브라우저 표준 {@link Response} 객체 (ReadableStream 포함)
437
437
  * - `stream: false` 인 경우: JSON 데이터
438
438
  */
439
- keypoint(text, stream) {
440
- return __awaiter(this, void 0, void 0, function* () {
439
+ keypoint(_a) {
440
+ return __awaiter(this, arguments, void 0, function* ({ text, stream = true }) {
441
441
  const requestParam = {
442
442
  command: "keywords",
443
- text: text,
444
- stream: stream !== null && stream !== void 0 ? stream : true,
443
+ params: {
444
+ text: text,
445
+ stream: stream,
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(imageUrl, stream) {
464
- return __awaiter(this, void 0, void 0, function* () {
465
+ imCap(_a) {
466
+ return __awaiter(this, arguments, void 0, function* ({ imageUrl, stream = true }) {
465
467
  const requestParam = {
466
- command: "imCap",
467
- imageUrl: imageUrl,
468
- stream: stream !== null && stream !== void 0 ? stream : true,
468
+ command: "im_cap",
469
+ params: {
470
+ image_url: imageUrl,
471
+ stream: stream,
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(language, text, stream) {
489
- return __awaiter(this, void 0, void 0, function* () {
492
+ translate(_a) {
493
+ return __awaiter(this, arguments, void 0, function* ({ language, text, stream = true }) {
490
494
  const requestParam = {
491
495
  command: "translate",
492
- language: language,
493
- text: text,
494
- stream: stream !== null && stream !== void 0 ? stream : true,
496
+ params: {
497
+ language: language,
498
+ text: text,
499
+ stream: stream,
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;
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: string, stream: boolean): Promise<any>;
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: string, stream: boolean): Promise<any>;
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: string, text: string, stream: boolean): Promise<any>;
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
@@ -260,12 +260,12 @@ export class Lens {
260
260
  const response = await fetch(this.baseURL, request);
261
261
  return response;
262
262
  }
263
- async chat({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
263
+ async chat({ question, stream = true, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
264
264
  const requestParam = {
265
265
  command: "lens_chat",
266
266
  params: {
267
267
  question: question,
268
- stream: stream ?? true,
268
+ stream: stream,
269
269
  },
270
270
  };
271
271
  if (model)
@@ -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 = true }) {
400
400
  const requestParam = {
401
401
  command: "keywords",
402
- text: text,
403
- stream: stream ?? true,
402
+ params: {
403
+ text: text,
404
+ stream: stream,
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 = true }) {
422
424
  const requestParam = {
423
- command: "imCap",
424
- imageUrl: imageUrl,
425
- stream: stream ?? true,
425
+ command: "im_cap",
426
+ params: {
427
+ image_url: imageUrl,
428
+ stream: stream,
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 = true }) {
445
449
  const requestParam = {
446
450
  command: "translate",
447
- language: language,
448
- text: text,
449
- stream: stream ?? true,
451
+ params: {
452
+ language: language,
453
+ text: text,
454
+ stream: stream,
455
+ },
450
456
  };
451
457
  const response = await this.request(requestParam);
452
458
  if (stream) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vectocore4",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/cjs/index.js",