@lemoncloud/eureka-agents-api 0.26.108
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/README.md +3 -0
- package/dist/cores/types.d.ts +219 -0
- package/dist/lib/gemini/types.d.ts +57 -0
- package/dist/lib/openai/types.d.ts +91 -0
- package/dist/lib/types.d.ts +176 -0
- package/dist/modules/agents/model.d.ts +602 -0
- package/dist/modules/agents/types.d.ts +578 -0
- package/dist/modules/agents/views.d.ts +208 -0
- package/dist/modules/callback/types.d.ts +55 -0
- package/dist/modules/mock/model.d.ts +100 -0
- package/dist/modules/mock/types.d.ts +42 -0
- package/dist/modules/mock/views.d.ts +49 -0
- package/dist/service/backend-types.d.ts +58 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/view/types.d.ts +13 -0
- package/package.json +24 -0
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chatbots/types.ts`
|
|
3
|
+
* - types used in `backed-proxy`
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
8
|
+
* @date 2025-03-18 refactoring for chatbot service.
|
|
9
|
+
* @Copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { ListResult, PaginateParam } from '../../cores/types';
|
|
12
|
+
import { DocumentView } from './views';
|
|
13
|
+
import { GenAIContent, TokenUsageDetail } from '../../lib/types';
|
|
14
|
+
export { GenAIContent, TokenUsageDetail };
|
|
15
|
+
/**
|
|
16
|
+
* Lookup Table
|
|
17
|
+
*
|
|
18
|
+
* WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
|
|
19
|
+
*/
|
|
20
|
+
declare const $LUT: {
|
|
21
|
+
/**
|
|
22
|
+
* Possible type of model.
|
|
23
|
+
*/
|
|
24
|
+
ModelType: {
|
|
25
|
+
/** agent model */
|
|
26
|
+
agent: string;
|
|
27
|
+
/** chat model */
|
|
28
|
+
chat: string;
|
|
29
|
+
/** prompt model */
|
|
30
|
+
prompt: string;
|
|
31
|
+
/** brain model */
|
|
32
|
+
brain: string;
|
|
33
|
+
/** document model */
|
|
34
|
+
document: string;
|
|
35
|
+
/** embedding model */
|
|
36
|
+
embedding: string;
|
|
37
|
+
/** usage model */
|
|
38
|
+
usage: string;
|
|
39
|
+
/** image model */
|
|
40
|
+
image: string;
|
|
41
|
+
/** rag model */
|
|
42
|
+
rag: string;
|
|
43
|
+
};
|
|
44
|
+
AgentStereo: {
|
|
45
|
+
'': string;
|
|
46
|
+
'#': string;
|
|
47
|
+
};
|
|
48
|
+
ChatStereo: {
|
|
49
|
+
'': string;
|
|
50
|
+
'#': string;
|
|
51
|
+
/** root of chat in tree (can be ready w/ `/agents/0/start`) */
|
|
52
|
+
root: string;
|
|
53
|
+
/** case of user query */
|
|
54
|
+
query: string;
|
|
55
|
+
/** case of answer generated */
|
|
56
|
+
answer: string;
|
|
57
|
+
/** (internal) used for rewrite */
|
|
58
|
+
rewrite: string;
|
|
59
|
+
/** (internal) used for RAG search w/ embedding */
|
|
60
|
+
search: string;
|
|
61
|
+
/** (internal) used for memory(short) */
|
|
62
|
+
memory: string;
|
|
63
|
+
/** (internal) 채팅비교시 이용함 (그룹화) */
|
|
64
|
+
group: string;
|
|
65
|
+
};
|
|
66
|
+
PromptStereo: {
|
|
67
|
+
'': string;
|
|
68
|
+
'#': string;
|
|
69
|
+
'#revision': string;
|
|
70
|
+
system: string;
|
|
71
|
+
user: string;
|
|
72
|
+
};
|
|
73
|
+
BrainStereo: {
|
|
74
|
+
'': string;
|
|
75
|
+
llm: string;
|
|
76
|
+
};
|
|
77
|
+
EmbeddingStereo: {
|
|
78
|
+
'': string;
|
|
79
|
+
'#': string;
|
|
80
|
+
system: string;
|
|
81
|
+
unit: string;
|
|
82
|
+
strategy: string;
|
|
83
|
+
site: string;
|
|
84
|
+
item: string;
|
|
85
|
+
prod: string;
|
|
86
|
+
'*': string;
|
|
87
|
+
};
|
|
88
|
+
UsageStereo: {
|
|
89
|
+
'': string;
|
|
90
|
+
'#': string;
|
|
91
|
+
};
|
|
92
|
+
ImageStereo: {
|
|
93
|
+
'': string;
|
|
94
|
+
'#': string;
|
|
95
|
+
'#alias': string;
|
|
96
|
+
};
|
|
97
|
+
/** document stereo */
|
|
98
|
+
DocumentStereo: {
|
|
99
|
+
'': string;
|
|
100
|
+
/** (internal) alias */
|
|
101
|
+
'#alias': string;
|
|
102
|
+
/** document in strategy state */
|
|
103
|
+
strategy: string;
|
|
104
|
+
/** document in embedding state */
|
|
105
|
+
embedding: string;
|
|
106
|
+
/** external; see `externalId` */
|
|
107
|
+
external: string;
|
|
108
|
+
/** document in chunking state */
|
|
109
|
+
chunking: string;
|
|
110
|
+
};
|
|
111
|
+
/** 문서 원본의 타입 */
|
|
112
|
+
DocumentExternalType: {
|
|
113
|
+
/** post (posts; 공지사항) */
|
|
114
|
+
post: string;
|
|
115
|
+
/** site (sites; 사업지) */
|
|
116
|
+
site: string;
|
|
117
|
+
/** content (contents: 유레카박스) */
|
|
118
|
+
content: string;
|
|
119
|
+
};
|
|
120
|
+
/** 문서 원본의 타입 */
|
|
121
|
+
DocumentResourceType: {
|
|
122
|
+
/** post (posts; 공지사항) */
|
|
123
|
+
posts: string;
|
|
124
|
+
/** site (sites; 사업지) */
|
|
125
|
+
sites: string;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* as `DocumentStrategy`
|
|
129
|
+
*/
|
|
130
|
+
DocumentStrategyType: {
|
|
131
|
+
/** '*' means every cases (but known as `default`) */
|
|
132
|
+
default: string;
|
|
133
|
+
/** markdown style #1 */
|
|
134
|
+
md1: string;
|
|
135
|
+
md2: string;
|
|
136
|
+
md3: string;
|
|
137
|
+
/** use json data */
|
|
138
|
+
json: string;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* as `ChatRoleType`
|
|
142
|
+
*/
|
|
143
|
+
ChatRoleType: {
|
|
144
|
+
/** system */
|
|
145
|
+
system: string;
|
|
146
|
+
/** user */
|
|
147
|
+
user: string;
|
|
148
|
+
/** assistant */
|
|
149
|
+
assistant: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* as `ChatModelType`
|
|
153
|
+
*/
|
|
154
|
+
ChatModelType: {
|
|
155
|
+
/** 'gpt-4o': 'gpt-4o' */
|
|
156
|
+
'gpt-4o': string;
|
|
157
|
+
/** 'gpt-4o-mini': 'gpt-4o-mini' */
|
|
158
|
+
'gpt-4o-mini': string;
|
|
159
|
+
/** 'gpt-4-turbo': 'gpt-4.0-turbo' */
|
|
160
|
+
'gpt-4-turbo': string;
|
|
161
|
+
/** 'gpt-4': 'gpt-4.0' */
|
|
162
|
+
'gpt-4': string;
|
|
163
|
+
/** 'gpt-4.1': 'gpt-4.1' */
|
|
164
|
+
'gpt-4.1': string;
|
|
165
|
+
/** 'gpt-3.5-turbo': 'gpt-3.5-turbo' */
|
|
166
|
+
'gpt-3.5-turbo': string;
|
|
167
|
+
/** 'gpt-5-mini': 'gpt-5-mini' */
|
|
168
|
+
'gpt-5-mini': string;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* as `ChatEmbeddingType`
|
|
172
|
+
*/
|
|
173
|
+
ChatEmbeddingType: {
|
|
174
|
+
/** as `openai/text-embedding-ada-002` */
|
|
175
|
+
ad2: string;
|
|
176
|
+
/** as `openai/text-embedding-3-small` */
|
|
177
|
+
sm3: string;
|
|
178
|
+
/** as `openai/text-embedding-3-large` */
|
|
179
|
+
lg3: string;
|
|
180
|
+
/** as `openai/gemini-embedding-001` */
|
|
181
|
+
gm1: string;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* as `ChatStrategyType`
|
|
185
|
+
* - markdown style
|
|
186
|
+
*/
|
|
187
|
+
ChatStrategyType: {
|
|
188
|
+
/** as `md-style-1` */
|
|
189
|
+
md1: string;
|
|
190
|
+
/** as `md-style-2` */
|
|
191
|
+
md2: string;
|
|
192
|
+
/** as `md-style-3` */
|
|
193
|
+
md3: string;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* as `ChatModelProviderType`
|
|
197
|
+
*/
|
|
198
|
+
ChatModelProviderType: {
|
|
199
|
+
amazon: string;
|
|
200
|
+
openai: string;
|
|
201
|
+
anthropic: string;
|
|
202
|
+
deepseek: string;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* 다큐먼스 종류 (원본에 대한)
|
|
206
|
+
*/
|
|
207
|
+
DocumentType: {
|
|
208
|
+
'': string;
|
|
209
|
+
'#rag': string;
|
|
210
|
+
/** as `doc` */
|
|
211
|
+
doc: string;
|
|
212
|
+
/** as `post` */
|
|
213
|
+
post: string;
|
|
214
|
+
/** as `site` */
|
|
215
|
+
site: string;
|
|
216
|
+
/** as `facility` */
|
|
217
|
+
facility: string;
|
|
218
|
+
/** as `content` */
|
|
219
|
+
content: string;
|
|
220
|
+
code: string;
|
|
221
|
+
/** as `program` */
|
|
222
|
+
program: string;
|
|
223
|
+
};
|
|
224
|
+
/** Encoding format of OpenAI Embedding */
|
|
225
|
+
EncodingFormat: {
|
|
226
|
+
/** as float */
|
|
227
|
+
float: string;
|
|
228
|
+
/** as base64 */
|
|
229
|
+
base64: string;
|
|
230
|
+
};
|
|
231
|
+
/** Embedding Dimension Size */
|
|
232
|
+
EmbeddingDimensions: {
|
|
233
|
+
ad2: number;
|
|
234
|
+
sm3: number;
|
|
235
|
+
lg3: number;
|
|
236
|
+
gm1: number;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* as `VisionModelType`
|
|
240
|
+
*/
|
|
241
|
+
VisionModelType: {
|
|
242
|
+
'gpt-4.1': string;
|
|
243
|
+
'gpt-4.1-mini': string;
|
|
244
|
+
'gpt-4.1-nano': string;
|
|
245
|
+
'gpt-4o': string;
|
|
246
|
+
'gpt-4o-mini': string;
|
|
247
|
+
};
|
|
248
|
+
/** Vision level of OpenAI */
|
|
249
|
+
VisionLevel: {
|
|
250
|
+
low: string;
|
|
251
|
+
high: string;
|
|
252
|
+
auto: string;
|
|
253
|
+
};
|
|
254
|
+
TextEmbeddingType: {
|
|
255
|
+
'text-embedding-ada-002': string;
|
|
256
|
+
'text-embedding-3-small': string;
|
|
257
|
+
'text-embedding-3-large': string;
|
|
258
|
+
'gemini-embedding-001': string;
|
|
259
|
+
};
|
|
260
|
+
/** type: TokenUsageType */
|
|
261
|
+
TokenUsageType: {
|
|
262
|
+
embedding: string;
|
|
263
|
+
completion: string;
|
|
264
|
+
vision: string;
|
|
265
|
+
classification: string;
|
|
266
|
+
};
|
|
267
|
+
/** 메타 정보의 타입 */
|
|
268
|
+
MetaInfoType: {
|
|
269
|
+
'': string;
|
|
270
|
+
/** link */
|
|
271
|
+
link: string;
|
|
272
|
+
/** image */
|
|
273
|
+
image: string;
|
|
274
|
+
/** phone */
|
|
275
|
+
phone: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* type: `AgentStereo`
|
|
280
|
+
*/
|
|
281
|
+
export declare type AgentStereo = keyof typeof $LUT.AgentStereo;
|
|
282
|
+
/**
|
|
283
|
+
* type: `ChatStereo`
|
|
284
|
+
*/
|
|
285
|
+
export declare type ChatStereo = keyof typeof $LUT.ChatStereo;
|
|
286
|
+
/**
|
|
287
|
+
* type: `PromptStereo`
|
|
288
|
+
*/
|
|
289
|
+
export declare type PromptStereo = keyof typeof $LUT.PromptStereo;
|
|
290
|
+
/**
|
|
291
|
+
* type: `BrainStereo`
|
|
292
|
+
*/
|
|
293
|
+
export declare type BrainStereo = keyof typeof $LUT.BrainStereo;
|
|
294
|
+
/**
|
|
295
|
+
* type: `DocumentStereo`
|
|
296
|
+
*/
|
|
297
|
+
export declare type DocumentStereo = keyof typeof $LUT.DocumentStereo;
|
|
298
|
+
/**
|
|
299
|
+
* type: `EmbeddingStereo`
|
|
300
|
+
*/
|
|
301
|
+
export declare type EmbeddingStereo = keyof typeof $LUT.EmbeddingStereo;
|
|
302
|
+
/**
|
|
303
|
+
* type: `UsageStereo`
|
|
304
|
+
*/
|
|
305
|
+
export declare type UsageStereo = keyof typeof $LUT.UsageStereo;
|
|
306
|
+
/**
|
|
307
|
+
* type: `ImageStereo`
|
|
308
|
+
*/
|
|
309
|
+
export declare type ImageStereo = keyof typeof $LUT.ImageStereo;
|
|
310
|
+
/**
|
|
311
|
+
* type: `DocumentExternalType`
|
|
312
|
+
*/
|
|
313
|
+
export declare type DocumentExternalType = keyof typeof $LUT.DocumentExternalType;
|
|
314
|
+
/**
|
|
315
|
+
* type: `DocumentResourceType`
|
|
316
|
+
*
|
|
317
|
+
* @deprecated use `DocumentOriginalType` instead.
|
|
318
|
+
*/
|
|
319
|
+
export declare type DocumentResourceType = keyof typeof $LUT.DocumentResourceType;
|
|
320
|
+
/**
|
|
321
|
+
* type: `DocumentStrategyType`
|
|
322
|
+
*/
|
|
323
|
+
export declare type DocumentStrategyType = keyof typeof $LUT.DocumentStrategyType;
|
|
324
|
+
/**
|
|
325
|
+
* type: `ChatStrategyType`
|
|
326
|
+
*/
|
|
327
|
+
export declare type ChatStrategyType = keyof typeof $LUT.ChatStrategyType;
|
|
328
|
+
/**
|
|
329
|
+
* type: `ChatRoleType`
|
|
330
|
+
*/
|
|
331
|
+
export declare type ChatRoleType = keyof typeof $LUT.ChatRoleType;
|
|
332
|
+
/**
|
|
333
|
+
* type: `ChatEmbeddingType`
|
|
334
|
+
*/
|
|
335
|
+
export declare type ChatEmbeddingType = keyof typeof $LUT.ChatEmbeddingType;
|
|
336
|
+
/**
|
|
337
|
+
* type: `EncodingFormat`
|
|
338
|
+
*/
|
|
339
|
+
export declare type EncodingFormat = keyof typeof $LUT.EncodingFormat;
|
|
340
|
+
/**
|
|
341
|
+
* type: `DocumentType`
|
|
342
|
+
*/
|
|
343
|
+
export declare type DocumentType = keyof typeof $LUT.DocumentType;
|
|
344
|
+
/**
|
|
345
|
+
* type: `ChatModelType`
|
|
346
|
+
*/
|
|
347
|
+
export declare type ChatModelType = keyof typeof $LUT.ChatModelType;
|
|
348
|
+
/**
|
|
349
|
+
* type: `ChatModelProviderType`
|
|
350
|
+
*/
|
|
351
|
+
export declare type ChatModelProviderType = keyof typeof $LUT.ChatModelProviderType;
|
|
352
|
+
/**
|
|
353
|
+
* type: `VisionLevel`
|
|
354
|
+
*/
|
|
355
|
+
export declare type VisionLevel = keyof typeof $LUT.VisionLevel;
|
|
356
|
+
/**
|
|
357
|
+
* type: `VisionModelType`
|
|
358
|
+
*/
|
|
359
|
+
export declare type VisionModelType = keyof typeof $LUT.VisionModelType;
|
|
360
|
+
/**
|
|
361
|
+
* type: `TokenUsageType`
|
|
362
|
+
*/
|
|
363
|
+
export declare type TokenUsageType = keyof typeof $LUT.TokenUsageType;
|
|
364
|
+
/**
|
|
365
|
+
* type: `TextEmbeddingType`
|
|
366
|
+
*/
|
|
367
|
+
export declare type TextEmbeddingType = keyof typeof $LUT.TextEmbeddingType;
|
|
368
|
+
/**
|
|
369
|
+
* type: `MetaInfoType`
|
|
370
|
+
*/
|
|
371
|
+
export declare type MetaInfoType = keyof typeof $LUT.MetaInfoType;
|
|
372
|
+
/**
|
|
373
|
+
* type: `AgentProfileMeta`
|
|
374
|
+
*/
|
|
375
|
+
export interface AgentProfileMeta extends DocumentMeta {
|
|
376
|
+
/** 닉이름 */
|
|
377
|
+
nick?: string;
|
|
378
|
+
/** 나이 */
|
|
379
|
+
age?: string;
|
|
380
|
+
/** 역할 */
|
|
381
|
+
role?: string;
|
|
382
|
+
/** 목표 */
|
|
383
|
+
goal?: string;
|
|
384
|
+
/** 성격 */
|
|
385
|
+
mind?: string;
|
|
386
|
+
/** 취미(좋아하는 것) */
|
|
387
|
+
like?: string;
|
|
388
|
+
/** 말투(말하는 스타일) */
|
|
389
|
+
tone?: string;
|
|
390
|
+
/** 인사말 (처음 인사말) */
|
|
391
|
+
greet?: string;
|
|
392
|
+
/** 자기소개 */
|
|
393
|
+
intro?: string;
|
|
394
|
+
/** 풀백 메시지 대응 */
|
|
395
|
+
back?: string;
|
|
396
|
+
/** 욕설 메시지 대응 */
|
|
397
|
+
abuse?: string;
|
|
398
|
+
/** 감사합니다. 표현 */
|
|
399
|
+
thank?: string;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* type: `AgentConfigSet`
|
|
403
|
+
* - configuration set for agent
|
|
404
|
+
*/
|
|
405
|
+
export interface AgentConfigSet {
|
|
406
|
+
/** WARN! only contain string value */
|
|
407
|
+
[key: string]: string;
|
|
408
|
+
/** max history depth (default: 12) */
|
|
409
|
+
maxHistory?: string;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* type: `DocumentSyncPullParam`
|
|
413
|
+
*/
|
|
414
|
+
export interface DocumentSyncPullParam<T = DocumentExternalType> extends PaginateParam {
|
|
415
|
+
/** 원본 타입 */
|
|
416
|
+
type?: T;
|
|
417
|
+
/** (optional) flag to 결과 저장 */
|
|
418
|
+
save?: string | boolean;
|
|
419
|
+
/** (optional) show in detail */
|
|
420
|
+
detail?: string | boolean;
|
|
421
|
+
/** (optional) force to save */
|
|
422
|
+
force?: string | boolean;
|
|
423
|
+
/** using version. (ex: `1`) */
|
|
424
|
+
version?: number;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* type: `DocumentSyncPullParamV2`
|
|
428
|
+
*/
|
|
429
|
+
export interface DocumentSyncPullParamV2 extends DocumentSyncPullParam<DocumentExternalType> {
|
|
430
|
+
/** 사업지 ID (type=site) */
|
|
431
|
+
siteId?: string;
|
|
432
|
+
/** 시설안내 ID (type=facility) */
|
|
433
|
+
facilityId?: string;
|
|
434
|
+
/** 게시판 ID (type=post) */
|
|
435
|
+
boardId?: string;
|
|
436
|
+
/** 게시글 ID (type=post) */
|
|
437
|
+
postId?: string;
|
|
438
|
+
/** 컨텐츠 ID (type=content) */
|
|
439
|
+
contentId?: string;
|
|
440
|
+
/** 코드 ID (type=code) */
|
|
441
|
+
codeId?: string;
|
|
442
|
+
/** 프로그램 ID (type=program) */
|
|
443
|
+
programId?: string;
|
|
444
|
+
/** stereo (type=program) */
|
|
445
|
+
stereo?: 'program' | 'seat' | string;
|
|
446
|
+
/** (for debug) flag to use production */
|
|
447
|
+
prod?: string;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* type: `DocumentSyncPullResult`
|
|
451
|
+
*/
|
|
452
|
+
export interface DocumentSyncPullResult<T = any> extends ListResult<DocumentView> {
|
|
453
|
+
/** 원본 목록 */
|
|
454
|
+
list2?: T[];
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* type: `ChatUserProfile`
|
|
458
|
+
*/
|
|
459
|
+
export interface ChatUserProfile {
|
|
460
|
+
/** id of user */
|
|
461
|
+
id?: string;
|
|
462
|
+
/** name of user */
|
|
463
|
+
name?: string;
|
|
464
|
+
/** 단지 이름 */
|
|
465
|
+
site?: string;
|
|
466
|
+
/** 단지 id */
|
|
467
|
+
sid?: string;
|
|
468
|
+
/** 동 */
|
|
469
|
+
dong?: string;
|
|
470
|
+
/** 호 */
|
|
471
|
+
ho?: string;
|
|
472
|
+
/** 성별 */
|
|
473
|
+
gender?: string;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* type: `DocumentCommon`
|
|
477
|
+
* - common information for document
|
|
478
|
+
*/
|
|
479
|
+
export interface DocumentCommon {
|
|
480
|
+
/** stereo of origin document */
|
|
481
|
+
stereo?: DocumentType;
|
|
482
|
+
/** strategy to transform */
|
|
483
|
+
strategy?: DocumentStrategyType;
|
|
484
|
+
/** meta data */
|
|
485
|
+
meta?: DocumentMeta;
|
|
486
|
+
/** image analysis response message */
|
|
487
|
+
visionMessage?: string;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* type: `DocumentMeta`
|
|
491
|
+
*/
|
|
492
|
+
export interface DocumentMeta {
|
|
493
|
+
/** 게시물 작성일 (ts) */
|
|
494
|
+
date?: string;
|
|
495
|
+
/** category */
|
|
496
|
+
category?: string;
|
|
497
|
+
/** author */
|
|
498
|
+
author?: string;
|
|
499
|
+
/** 게시물 url */
|
|
500
|
+
url?: string;
|
|
501
|
+
/** images url */
|
|
502
|
+
images?: string[];
|
|
503
|
+
/** meta of chunking */
|
|
504
|
+
chunks?: ChunkMeta[];
|
|
505
|
+
/** code extension */
|
|
506
|
+
extension?: string;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* type: `RagChatBody`
|
|
510
|
+
*/
|
|
511
|
+
export interface RagChatBody {
|
|
512
|
+
/** 사용자 질문 */
|
|
513
|
+
input?: string;
|
|
514
|
+
/**
|
|
515
|
+
* (optional) site-id to apply
|
|
516
|
+
* - default is from session
|
|
517
|
+
*/
|
|
518
|
+
sid?: string;
|
|
519
|
+
/** (optional) websocket connection-id to receive the server-sent events */
|
|
520
|
+
connectionId?: string;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* type: `ChatParam`
|
|
524
|
+
*/
|
|
525
|
+
export interface RagChatParam {
|
|
526
|
+
/** system prompt to chat */
|
|
527
|
+
prompt?: string;
|
|
528
|
+
/** user prompt to chat */
|
|
529
|
+
userPrompt?: string;
|
|
530
|
+
/** strategy to search */
|
|
531
|
+
strategy?: string | ChatStrategyType;
|
|
532
|
+
/** embedding model */
|
|
533
|
+
embedding?: string | ChatEmbeddingType;
|
|
534
|
+
/** websocket connection-id */
|
|
535
|
+
connId?: string;
|
|
536
|
+
/** (optional) parent chat id */
|
|
537
|
+
parent?: string;
|
|
538
|
+
/** flag to use quota request */
|
|
539
|
+
quota?: string | boolean;
|
|
540
|
+
/** flag to use chat history */
|
|
541
|
+
history?: string | boolean;
|
|
542
|
+
/** flag to use RAG search */
|
|
543
|
+
rag?: string | boolean;
|
|
544
|
+
/** size of RAG search (default: 6) */
|
|
545
|
+
size?: number;
|
|
546
|
+
/**
|
|
547
|
+
* (optional) type to search.
|
|
548
|
+
* - default is 'item' (품목)
|
|
549
|
+
* - '*' (item | prod)
|
|
550
|
+
* - 'site' (사업지)
|
|
551
|
+
* - 'prod' (상품)
|
|
552
|
+
* - 'item' (품목)
|
|
553
|
+
*/
|
|
554
|
+
type?: 'item' | 'prod' | '*' | 'site';
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* type: `MetaInfo`
|
|
558
|
+
* - chat meta info
|
|
559
|
+
*/
|
|
560
|
+
export interface MetaInfo {
|
|
561
|
+
/** type of meta info */
|
|
562
|
+
type?: MetaInfoType;
|
|
563
|
+
/** text of meta */
|
|
564
|
+
text?: string;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* type: `ChunkMeta`
|
|
568
|
+
*/
|
|
569
|
+
export interface ChunkMeta {
|
|
570
|
+
/** start line of chunk */
|
|
571
|
+
start?: number;
|
|
572
|
+
/** end line of chunk */
|
|
573
|
+
end?: number;
|
|
574
|
+
/** name of chunk */
|
|
575
|
+
name?: string;
|
|
576
|
+
}
|
|
577
|
+
/** must export $LUT as default */
|
|
578
|
+
export default $LUT;
|