vectocore4 0.0.20 → 0.0.21
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/mjs/index.js +3 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -314,7 +314,7 @@ class Lens {
|
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
chat(_a) {
|
|
317
|
-
return __awaiter(this, arguments, void 0, function* ({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, }) {
|
|
317
|
+
return __awaiter(this, arguments, void 0, function* ({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
|
|
318
318
|
const requestParam = {
|
|
319
319
|
command: "lens_chat",
|
|
320
320
|
params: {
|
|
@@ -344,6 +344,8 @@ class Lens {
|
|
|
344
344
|
requestParam.params.with_status = withStatus;
|
|
345
345
|
if (staticInfo)
|
|
346
346
|
requestParam.params.static_info = staticInfo;
|
|
347
|
+
if (customSystemPrompt)
|
|
348
|
+
requestParam.params.custom_system_prompt = customSystemPrompt;
|
|
347
349
|
let response = yield this.requestStream(requestParam);
|
|
348
350
|
if (stream) {
|
|
349
351
|
return response.body.getReader();
|
package/dist/index.d.ts
CHANGED
|
@@ -196,6 +196,8 @@ export interface LensChatParams {
|
|
|
196
196
|
withStatus?: boolean;
|
|
197
197
|
/** 사용자의 질문으로 보낼 수 없는 고유한 정보들이 있는 경우 static_info에 보내면 해당 데이터를 AI가 참고함. */
|
|
198
198
|
staticInfo?: any;
|
|
199
|
+
/** Lens의 기본 시스템 프롬프트를 대체함. */
|
|
200
|
+
customSystemPrompt?: string;
|
|
199
201
|
}
|
|
200
202
|
export interface ChatHistoryParams {
|
|
201
203
|
sessionKey: string;
|
|
@@ -317,7 +319,7 @@ export declare class Lens {
|
|
|
317
319
|
constructor({ tenantKey, baseURL }: ClientOptions);
|
|
318
320
|
protected requestStream(requestBody: any): Promise<ReadableStream<Uint8Array> | null>;
|
|
319
321
|
protected genStreamResponse(streamRes: ReadableStream): Promise<any>;
|
|
320
|
-
chat({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, }: LensChatParams): Promise<any>;
|
|
322
|
+
chat({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }: LensChatParams): Promise<any>;
|
|
321
323
|
history({ sessionKey, limit }: ChatHistoryParams): Promise<any>;
|
|
322
324
|
jsonAutoComplete(jsonString: string): string | null;
|
|
323
325
|
}
|
package/dist/mjs/index.js
CHANGED
|
@@ -274,7 +274,7 @@ export class Lens {
|
|
|
274
274
|
const payload = JSON.parse(content);
|
|
275
275
|
return payload;
|
|
276
276
|
}
|
|
277
|
-
async chat({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, }) {
|
|
277
|
+
async chat({ question, stream, model, xfinder, webSearch, agentic, imageUrls, fileUrls, customContext, sessionKey, maxHisCount, withStatus, staticInfo, customSystemPrompt, }) {
|
|
278
278
|
const requestParam = {
|
|
279
279
|
command: "lens_chat",
|
|
280
280
|
params: {
|
|
@@ -304,6 +304,8 @@ export class Lens {
|
|
|
304
304
|
requestParam.params.with_status = withStatus;
|
|
305
305
|
if (staticInfo)
|
|
306
306
|
requestParam.params.static_info = staticInfo;
|
|
307
|
+
if (customSystemPrompt)
|
|
308
|
+
requestParam.params.custom_system_prompt = customSystemPrompt;
|
|
307
309
|
let response = await this.requestStream(requestParam);
|
|
308
310
|
if (stream) {
|
|
309
311
|
return response.body.getReader();
|