vectocore4 0.0.5 → 0.0.7
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 +16 -14
- package/dist/index.d.ts +16 -12
- package/dist/mjs/index.js +14 -12
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -75,11 +75,11 @@ class Vectocore {
|
|
|
75
75
|
return response;
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
putExtremeData(_a) {
|
|
79
79
|
return __awaiter(this, arguments, void 0, function* ({ indexName, docBody }) {
|
|
80
80
|
var _b, _c;
|
|
81
81
|
const requestParam = {
|
|
82
|
-
command: "
|
|
82
|
+
command: "put_extreme_data",
|
|
83
83
|
params: {
|
|
84
84
|
index_name: indexName,
|
|
85
85
|
doc_body: {
|
|
@@ -101,10 +101,10 @@ class Vectocore {
|
|
|
101
101
|
return response;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
getExtremeData(_a) {
|
|
105
105
|
return __awaiter(this, arguments, void 0, function* ({ indexName, documentId }) {
|
|
106
106
|
const requestParam = {
|
|
107
|
-
command: "
|
|
107
|
+
command: "get_extreme_data",
|
|
108
108
|
params: {
|
|
109
109
|
index_name: indexName,
|
|
110
110
|
document_id: documentId,
|
|
@@ -114,12 +114,13 @@ class Vectocore {
|
|
|
114
114
|
return response;
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
return __awaiter(this, arguments, void 0, function* ({ indexName, lastKey }) {
|
|
117
|
+
listExtremeData(_a) {
|
|
118
|
+
return __awaiter(this, arguments, void 0, function* ({ indexName, lastKey, withVectorValue }) {
|
|
119
119
|
const requestParam = {
|
|
120
|
-
command: "
|
|
120
|
+
command: "list_extreme_data",
|
|
121
121
|
params: {
|
|
122
122
|
index_name: indexName,
|
|
123
|
+
with_vector_value: withVectorValue !== null && withVectorValue !== void 0 ? withVectorValue : false,
|
|
123
124
|
},
|
|
124
125
|
};
|
|
125
126
|
if (lastKey) {
|
|
@@ -129,22 +130,23 @@ class Vectocore {
|
|
|
129
130
|
return response;
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
return __awaiter(this, arguments, void 0, function* ({ indexName }) {
|
|
133
|
+
listAllExtremeData(_a) {
|
|
134
|
+
return __awaiter(this, arguments, void 0, function* ({ indexName, withVectorValue }) {
|
|
134
135
|
const requestParam = {
|
|
135
|
-
command: "
|
|
136
|
+
command: "list_all_extreme_data",
|
|
136
137
|
params: {
|
|
137
138
|
index_name: indexName,
|
|
139
|
+
with_vector_value: withVectorValue !== null && withVectorValue !== void 0 ? withVectorValue : false,
|
|
138
140
|
},
|
|
139
141
|
};
|
|
140
142
|
const response = yield this.requestPost(requestParam);
|
|
141
143
|
return response;
|
|
142
144
|
});
|
|
143
145
|
}
|
|
144
|
-
|
|
146
|
+
deleteExtremeData(_a) {
|
|
145
147
|
return __awaiter(this, arguments, void 0, function* ({ indexName, documentId }) {
|
|
146
148
|
const requestParam = {
|
|
147
|
-
command: "
|
|
149
|
+
command: "delete_extreme_data",
|
|
148
150
|
params: {
|
|
149
151
|
index_name: indexName,
|
|
150
152
|
document_id: documentId,
|
|
@@ -154,10 +156,10 @@ class Vectocore {
|
|
|
154
156
|
return response;
|
|
155
157
|
});
|
|
156
158
|
}
|
|
157
|
-
|
|
159
|
+
extremeSearch(_a) {
|
|
158
160
|
return __awaiter(this, arguments, void 0, function* ({ mode, indexNames, question, top, rerank }) {
|
|
159
161
|
const requestParam = {
|
|
160
|
-
command: "
|
|
162
|
+
command: "extreme_search",
|
|
161
163
|
params: {
|
|
162
164
|
mode: mode !== null && mode !== void 0 ? mode : "vector",
|
|
163
165
|
index_names: indexNames !== null && indexNames !== void 0 ? indexNames : [],
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface DeleteIndexParams {
|
|
|
49
49
|
*/
|
|
50
50
|
indexName: string;
|
|
51
51
|
}
|
|
52
|
-
export interface
|
|
52
|
+
export interface PutExtremeDataParams {
|
|
53
53
|
/**
|
|
54
54
|
* 지식을 추가할 인덱스의 이름입니다.
|
|
55
55
|
*/
|
|
@@ -74,29 +74,33 @@ export interface PutExtreamDataParams {
|
|
|
74
74
|
refOnlyText?: boolean;
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
export interface
|
|
77
|
+
export interface ListExtremeDataParams {
|
|
78
78
|
/** 데이터 목록을 조회할 인덱스의 이름입니다. */
|
|
79
79
|
indexName: string;
|
|
80
80
|
/** 페이징된 결과를 받았을때 해당 key부터 다음 페이징까지 결과를 조회하는 기준 키 입니다. */
|
|
81
81
|
lastKey?: string | null;
|
|
82
|
+
/** 임베딩 값을 리턴받고 싶을때 사용. 단 페이로드가 커지는 만큼 성능에 영향을 끼칠 수 있음. */
|
|
83
|
+
withVectorValue?: boolean;
|
|
82
84
|
}
|
|
83
|
-
export interface
|
|
85
|
+
export interface ListAllExtremeDataParams {
|
|
84
86
|
/** 데이터 목록을 조회할 인덱스의 이름입니다. */
|
|
85
87
|
indexName: string;
|
|
88
|
+
/** 임베딩 값을 리턴받고 싶을때 사용. 단 페이로드가 커지는 만큼 성능에 영향을 끼칠 수 있음. */
|
|
89
|
+
withVectorValue?: boolean;
|
|
86
90
|
}
|
|
87
|
-
export interface
|
|
91
|
+
export interface GetExtremeDataParams {
|
|
88
92
|
/** 조회할 문서가 저장되어 있는 인덱스의 이름입니다. */
|
|
89
93
|
indexName: string;
|
|
90
94
|
/** 조회할 문서의 ID입니다. */
|
|
91
95
|
documentId: string;
|
|
92
96
|
}
|
|
93
|
-
export interface
|
|
97
|
+
export interface DeleteExtremeDataParams {
|
|
94
98
|
/** 삭제할 문서가 저장되어 있는 인덱스의 이름입니다. */
|
|
95
99
|
indexName: string;
|
|
96
100
|
/** 삭제할 문서의 ID입니다. */
|
|
97
101
|
documentId: string;
|
|
98
102
|
}
|
|
99
|
-
export interface
|
|
103
|
+
export interface ExtremeSearchParams {
|
|
100
104
|
/** 사용자의 질문을 검색하고자하는 인덱스 목록, 생략하거나 []를 전송시 전체 인덱스에서 검색 실행합니다. */
|
|
101
105
|
indexNames?: string[];
|
|
102
106
|
/** 사용자 질문 (시멘틱 검색을 사용하기때문에 서술형을 질문해도 의미를 파악하여 유사한 결과를 유사도 순위별로 리턴.) */
|
|
@@ -166,12 +170,12 @@ export declare class Vectocore {
|
|
|
166
170
|
putIndex({ indexName, description }: PutIndexParams): Promise<any>;
|
|
167
171
|
deleteIndex({ indexName }: DeleteIndexParams): Promise<any>;
|
|
168
172
|
listIndex(): Promise<any>;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
putExtremeData({ indexName, docBody }: PutExtremeDataParams): Promise<any>;
|
|
174
|
+
getExtremeData({ indexName, documentId }: GetExtremeDataParams): Promise<any>;
|
|
175
|
+
listExtremeData({ indexName, lastKey, withVectorValue }: ListExtremeDataParams): Promise<any>;
|
|
176
|
+
listAllExtremeData({ indexName, withVectorValue }: ListAllExtremeDataParams): Promise<any>;
|
|
177
|
+
deleteExtremeData({ indexName, documentId }: DeleteExtremeDataParams): Promise<any>;
|
|
178
|
+
extremeSearch({ mode, indexNames, question, top, rerank }: ExtremeSearchParams): Promise<any>;
|
|
175
179
|
webSearch({ question }: WebSearchParams): Promise<any>;
|
|
176
180
|
}
|
|
177
181
|
export declare class Lens {
|
package/dist/mjs/index.js
CHANGED
|
@@ -54,9 +54,9 @@ export class Vectocore {
|
|
|
54
54
|
const response = await this.requestPost(requestParam);
|
|
55
55
|
return response;
|
|
56
56
|
}
|
|
57
|
-
async
|
|
57
|
+
async putExtremeData({ indexName, docBody }) {
|
|
58
58
|
const requestParam = {
|
|
59
|
-
command: "
|
|
59
|
+
command: "put_extreme_data",
|
|
60
60
|
params: {
|
|
61
61
|
index_name: indexName,
|
|
62
62
|
doc_body: {
|
|
@@ -77,9 +77,9 @@ export class Vectocore {
|
|
|
77
77
|
const response = await this.requestPost(requestParam);
|
|
78
78
|
return response;
|
|
79
79
|
}
|
|
80
|
-
async
|
|
80
|
+
async getExtremeData({ indexName, documentId }) {
|
|
81
81
|
const requestParam = {
|
|
82
|
-
command: "
|
|
82
|
+
command: "get_extreme_data",
|
|
83
83
|
params: {
|
|
84
84
|
index_name: indexName,
|
|
85
85
|
document_id: documentId,
|
|
@@ -88,11 +88,12 @@ export class Vectocore {
|
|
|
88
88
|
const response = await this.requestPost(requestParam);
|
|
89
89
|
return response;
|
|
90
90
|
}
|
|
91
|
-
async
|
|
91
|
+
async listExtremeData({ indexName, lastKey, withVectorValue }) {
|
|
92
92
|
const requestParam = {
|
|
93
|
-
command: "
|
|
93
|
+
command: "list_extreme_data",
|
|
94
94
|
params: {
|
|
95
95
|
index_name: indexName,
|
|
96
|
+
with_vector_value: withVectorValue ?? false,
|
|
96
97
|
},
|
|
97
98
|
};
|
|
98
99
|
if (lastKey) {
|
|
@@ -101,19 +102,20 @@ export class Vectocore {
|
|
|
101
102
|
const response = await this.requestPost(requestParam);
|
|
102
103
|
return response;
|
|
103
104
|
}
|
|
104
|
-
async
|
|
105
|
+
async listAllExtremeData({ indexName, withVectorValue }) {
|
|
105
106
|
const requestParam = {
|
|
106
|
-
command: "
|
|
107
|
+
command: "list_all_extreme_data",
|
|
107
108
|
params: {
|
|
108
109
|
index_name: indexName,
|
|
110
|
+
with_vector_value: withVectorValue ?? false,
|
|
109
111
|
},
|
|
110
112
|
};
|
|
111
113
|
const response = await this.requestPost(requestParam);
|
|
112
114
|
return response;
|
|
113
115
|
}
|
|
114
|
-
async
|
|
116
|
+
async deleteExtremeData({ indexName, documentId }) {
|
|
115
117
|
const requestParam = {
|
|
116
|
-
command: "
|
|
118
|
+
command: "delete_extreme_data",
|
|
117
119
|
params: {
|
|
118
120
|
index_name: indexName,
|
|
119
121
|
document_id: documentId,
|
|
@@ -122,9 +124,9 @@ export class Vectocore {
|
|
|
122
124
|
const response = await this.requestPost(requestParam);
|
|
123
125
|
return response;
|
|
124
126
|
}
|
|
125
|
-
async
|
|
127
|
+
async extremeSearch({ mode, indexNames, question, top, rerank }) {
|
|
126
128
|
const requestParam = {
|
|
127
|
-
command: "
|
|
129
|
+
command: "extreme_search",
|
|
128
130
|
params: {
|
|
129
131
|
mode: mode ?? "vector",
|
|
130
132
|
index_names: indexNames ?? [],
|