vectocore4 0.0.22 → 0.0.23
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/index.d.ts +17 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface DeleteIndexParams {
|
|
|
28
28
|
*/
|
|
29
29
|
indexName: string;
|
|
30
30
|
}
|
|
31
|
+
export type XFinderDocType = "text" | "image";
|
|
31
32
|
export interface PutExtremeDataParams {
|
|
32
33
|
/**
|
|
33
34
|
* 지식을 추가할 인덱스의 이름입니다.
|
|
@@ -43,8 +44,8 @@ export interface PutExtremeDataParams {
|
|
|
43
44
|
keywords: string;
|
|
44
45
|
/** 실제 지식 본문 텍스트 데이터 */
|
|
45
46
|
data: string;
|
|
46
|
-
/** 저장하는 지식의 타입 */
|
|
47
|
-
docType:
|
|
47
|
+
/** 저장하는 지식의 타입 ({@link XFinderDocType}) */
|
|
48
|
+
docType: XFinderDocType;
|
|
48
49
|
/** docType이 "image"인 경우 함께 업로드할 이미지의 URL입니다. */
|
|
49
50
|
imageUrl?: string;
|
|
50
51
|
/** 문서 저장시 추가로 남기고 싶은 정보를 json 형식으로 추가하면 향후 검색 결과시 리턴. 문서명이나, 페이지 번호 등을 입력하여 출처 확인용으로 사용할 수 있습니다. */
|
|
@@ -79,18 +80,20 @@ export interface DeleteExtremeDataParams {
|
|
|
79
80
|
/** 삭제할 문서의 ID입니다. */
|
|
80
81
|
documentId: string;
|
|
81
82
|
}
|
|
83
|
+
export type XFinderModeType = "vector" | "keyword" | "hybrid";
|
|
82
84
|
export interface ExtremeSearchParams {
|
|
83
85
|
/** 사용자의 질문을 검색하고자하는 인덱스 목록, 생략하거나 []를 전송시 전체 인덱스에서 검색 실행합니다. */
|
|
84
86
|
indexNames?: string[];
|
|
85
87
|
/** 사용자 질문 (시멘틱 검색을 사용하기때문에 서술형을 질문해도 의미를 파악하여 유사한 결과를 유사도 순위별로 리턴.) */
|
|
86
88
|
question: string;
|
|
87
89
|
/**
|
|
90
|
+
* @type ({@link XFinderModeType})
|
|
88
91
|
* • vector 모드 : 시멘틱 유사도만 사용
|
|
89
92
|
* • keyword 모드 : 키워드 유사도만 사용, 키워드 모드인 경우 해당 "단어"가 문서에 없으면 빈 list를 리턴
|
|
90
93
|
* • hybrid 모드 : 시멘틱 검색 순위와 키워드 검색 순위를 모두 사용하여 순위 결정
|
|
91
94
|
* @default "vector"
|
|
92
95
|
*/
|
|
93
|
-
mode?:
|
|
96
|
+
mode?: XFinderModeType;
|
|
94
97
|
/** 결과로 보고싶은 목록의 최대 건수, 생략시 10건을 조회. */
|
|
95
98
|
top?: number;
|
|
96
99
|
/** 검색 mode가 hybrid일 경우 벡터 검색과 키워드 검색 결과를 ai가 다시 score를 산정하는 방식으로 별도의 토큰이 소모 됨. */
|
|
@@ -102,9 +105,9 @@ export interface WebSearchParams {
|
|
|
102
105
|
}
|
|
103
106
|
type XFinderOptions = {
|
|
104
107
|
/**
|
|
105
|
-
* vector | keyword | hybrid (Default : hybrid)
|
|
108
|
+
* vector | keyword | hybrid (Default : hybrid) ({@link XFinderModeType})
|
|
106
109
|
*/
|
|
107
|
-
mode?:
|
|
110
|
+
mode?: XFinderModeType;
|
|
108
111
|
/**
|
|
109
112
|
* 검색에 사용할 index명 목록, 생략 또는 []시 전체 인덱스 스캔
|
|
110
113
|
*/
|
|
@@ -138,24 +141,25 @@ type CustomContextOptions = {
|
|
|
138
141
|
/** 멀티모달 Context로 전송할 이미지 경로 URL */
|
|
139
142
|
imageUrls?: string;
|
|
140
143
|
};
|
|
141
|
-
export type
|
|
144
|
+
export type LensFileType = {
|
|
142
145
|
type: string;
|
|
143
146
|
name: string;
|
|
144
147
|
url: string;
|
|
145
148
|
extImgUrls?: string[];
|
|
146
149
|
};
|
|
150
|
+
export type LensModelType = "5.1chat" | "5chat" | "4o" | "mini";
|
|
147
151
|
export interface LensChatParams {
|
|
148
152
|
/** 사용자 질문 (필수) */
|
|
149
153
|
question: string;
|
|
150
154
|
/** 스트림 응답 모드 (선택) 기본값 : true */
|
|
151
155
|
stream?: boolean;
|
|
152
156
|
/**
|
|
153
|
-
* 모델 선택 (선택) 기본값 : 5.1chat
|
|
157
|
+
* 모델 선택 (선택) 기본값 : 5.1chat ({@link LensModelType})
|
|
154
158
|
* - 5.1chat, 5chat, 4o, mini, Default : 5.1chat
|
|
155
159
|
* - ‼️ 단, chat 모델의 경우 만료될 수 있음.
|
|
156
160
|
* - ‼️ mini 모델은 멀티모달을 사용할 수 없음.
|
|
157
161
|
* */
|
|
158
|
-
model?:
|
|
162
|
+
model?: LensModelType;
|
|
159
163
|
/** 사전에 등록한 내부지식(X-Finder)를 사용하고자 할 경우 아래 파라미터 추가 ({@link XFinderOptions}) */
|
|
160
164
|
xfinder?: XFinderOptions;
|
|
161
165
|
/** 웹 검색 결과를 Context로 제공하고자 할 때 사용(별도 권한 필요) ({@link WebSearchOptions}) */
|
|
@@ -164,8 +168,11 @@ export interface LensChatParams {
|
|
|
164
168
|
agentic?: AgenticOptions;
|
|
165
169
|
/** 사용자 멀티모달 이미지 입력 시 자동으로 호출 */
|
|
166
170
|
imageUrls?: string[];
|
|
167
|
-
/**
|
|
168
|
-
|
|
171
|
+
/**
|
|
172
|
+
* @type ({@link LensFileType})
|
|
173
|
+
* 사용자 멀티모달 파일(페이지별 이미지) 입력 시, 순수 파일을 올릴 수는 없고 별도의 pdf to images 와 같은 전처리 과정을 거쳐 문서의 각 페이지별 이미지 캡쳐본을 올릴 수 있음. 자동으로 호출
|
|
174
|
+
* */
|
|
175
|
+
fileUrls?: LensFileType;
|
|
169
176
|
/**
|
|
170
177
|
* 사용자가 직접 정의한 Context 내에서 답변하고자 할 경우 ({@link CustomContextOptions})
|
|
171
178
|
* 해당 파라미터가 있는 경우 Rag를 무시하고 사용자가 입력한 Context 내에서만 답변합니다.
|