vectocore4 1.0.3 → 1.0.5
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 +12 -5
- package/dist/index.d.ts +1 -1
- package/dist/mjs/index.js +9 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -411,7 +411,7 @@ class Lens {
|
|
|
411
411
|
*/
|
|
412
412
|
chat(_a) {
|
|
413
413
|
return __awaiter(this, arguments, void 0, function* ({ question, stream = true, model = "4o", xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
|
|
414
|
-
var _b, _c;
|
|
414
|
+
var _b, _c, _d, _e, _f, _g;
|
|
415
415
|
const requestParam = {
|
|
416
416
|
command: "lens_chat",
|
|
417
417
|
params: {
|
|
@@ -421,12 +421,19 @@ class Lens {
|
|
|
421
421
|
};
|
|
422
422
|
if (model)
|
|
423
423
|
requestParam.params.model = model;
|
|
424
|
-
if (xfinder)
|
|
425
|
-
requestParam.params.xfinder =
|
|
424
|
+
if (xfinder) {
|
|
425
|
+
requestParam.params.xfinder = {
|
|
426
|
+
mode: (_b = xfinder.mode) !== null && _b !== void 0 ? _b : "hybrid",
|
|
427
|
+
index_names: (_c = xfinder.indexNames) !== null && _c !== void 0 ? _c : [],
|
|
428
|
+
top: xfinder.top,
|
|
429
|
+
rerank: (_d = xfinder.rerank) !== null && _d !== void 0 ? _d : false,
|
|
430
|
+
text_only: (_e = xfinder.textOnly) !== null && _e !== void 0 ? _e : false,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
426
433
|
if (webSearch) {
|
|
427
434
|
requestParam.params.web_search = {
|
|
428
|
-
with_image: (
|
|
429
|
-
with_video: (
|
|
435
|
+
with_image: (_f = webSearch.withImage) !== null && _f !== void 0 ? _f : false,
|
|
436
|
+
with_video: (_g = webSearch.withVideo) !== null && _g !== void 0 ? _g : false,
|
|
430
437
|
};
|
|
431
438
|
}
|
|
432
439
|
if (agentic)
|
package/dist/index.d.ts
CHANGED
package/dist/mjs/index.js
CHANGED
|
@@ -385,8 +385,15 @@ export class Lens {
|
|
|
385
385
|
};
|
|
386
386
|
if (model)
|
|
387
387
|
requestParam.params.model = model;
|
|
388
|
-
if (xfinder)
|
|
389
|
-
requestParam.params.xfinder =
|
|
388
|
+
if (xfinder) {
|
|
389
|
+
requestParam.params.xfinder = {
|
|
390
|
+
mode: xfinder.mode ?? "hybrid",
|
|
391
|
+
index_names: xfinder.indexNames ?? [],
|
|
392
|
+
top: xfinder.top,
|
|
393
|
+
rerank: xfinder.rerank ?? false,
|
|
394
|
+
text_only: xfinder.textOnly ?? false,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
390
397
|
if (webSearch) {
|
|
391
398
|
requestParam.params.web_search = {
|
|
392
399
|
with_image: webSearch.withImage ?? false,
|