@glodon-aiot/apis 3.25.0 → 3.25.1-alpha.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PromptVariableType } from '../cvforce/model';
|
|
1
|
+
import { IRelatedQuestionApp, PromptVariableType } from '../cvforce/model';
|
|
2
2
|
export interface IArrange {
|
|
3
3
|
llmModel: string;
|
|
4
4
|
prePrompt: string;
|
|
@@ -9,10 +9,14 @@ export interface IArrange {
|
|
|
9
9
|
textFilter: number;
|
|
10
10
|
roleCognition: string;
|
|
11
11
|
repetitionPenalty: number;
|
|
12
|
+
temperatureEnabled?: boolean;
|
|
13
|
+
llmTopPEnabled?: boolean;
|
|
14
|
+
repetitionPenaltyEnabled?: boolean;
|
|
12
15
|
embeddingService: string;
|
|
13
16
|
enableNetOpen: boolean;
|
|
14
17
|
openingContent?: string;
|
|
15
18
|
recommendQuestionOpen?: boolean;
|
|
19
|
+
relatedQuestionApp?: IRelatedQuestionApp;
|
|
16
20
|
visionOpen?: boolean;
|
|
17
21
|
greetings?: string;
|
|
18
22
|
thinkingModeOpen?: boolean;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { ApiErrorHandler, BaseApi } from '../base';
|
|
3
|
+
import { IApplication, ICommentParam, IAecFile as IFile, IAecFileDataParam as IFileDataParam, IHistory, IAecKnowledge, IAecPrompt as IPrompt, IAecPromptParam as IPromptParam, IPromptType, IQuestion, IAecSessionParam as ISessionParam, IAecSession as ISession, KnowledgeFileMetadata, KnowledgeFileMetadataParams, IFileParams, IKnowledgeFileParams } from '../aecpilot/model';
|
|
4
|
+
import { IBaseModel, IUploadParam, IUploadTicket, MinioConfig } from './model';
|
|
5
|
+
import { IGeneques, IPromptVariables, ISessionPrompt } from '../aecpilotui/model';
|
|
6
|
+
export declare class BotClientUIApi extends BaseApi {
|
|
7
|
+
private axiosInstance;
|
|
8
|
+
private getToken;
|
|
9
|
+
constructor(axiosInstance: AxiosInstance, getToken: () => string, errorHandler?: ApiErrorHandler);
|
|
10
|
+
getApplicationIdSessions(appId: string): Promise<ISession[]>;
|
|
11
|
+
getApplicationId(id: string): Promise<IApplication>;
|
|
12
|
+
postApplicationIdSession(params: ISessionParam): Promise<ISession>;
|
|
13
|
+
getApplicationIdSessionsId(appId: string, id: string): Promise<ISession>;
|
|
14
|
+
patchApplicationIdSessionsId(appId: string, id: string, params: ISessionParam): Promise<ISession>;
|
|
15
|
+
patchApplicationIdSessionsIdContext(id: string, sid: string): Promise<unknown>;
|
|
16
|
+
delApplicationIdSessionsId(appId: string, id: string): Promise<ISession>;
|
|
17
|
+
postComments(id: string, sid: string, params: ICommentParam): Promise<unknown>;
|
|
18
|
+
getChatHistorySessionId(appId: string, sessionId: string): Promise<IHistory[]>;
|
|
19
|
+
postChatV2EventSource(applicationId: string, sessionId: string, params: any, signal: AbortSignal, options: {
|
|
20
|
+
onopen?: any;
|
|
21
|
+
onmessage?: any;
|
|
22
|
+
onerror?: any;
|
|
23
|
+
onclose?: any;
|
|
24
|
+
}, onAppStatusError?: (error: any) => void): Promise<void>;
|
|
25
|
+
getKnowledgeIdFileIdData(id: string, fid: string, did: string): Promise<IFileDataParam[]>;
|
|
26
|
+
getKnowledgeIdFileId(id: string, fid: string): Promise<IFile>;
|
|
27
|
+
getKnowledgeId(id: string): Promise<IAecKnowledge>;
|
|
28
|
+
getSessionKnowledgeFile(sessionId: string, fileId: string): Promise<KnowledgeFileMetadata>;
|
|
29
|
+
sleep(ms: number): Promise<unknown>;
|
|
30
|
+
getBaseModelInfo(serviceId: string): Promise<IBaseModel>;
|
|
31
|
+
uploadFiles(path: string, files: File[]): Promise<string[]>;
|
|
32
|
+
postFile(path: string, file: File, type?: number): Promise<string>;
|
|
33
|
+
postTicket(params: IUploadParam): Promise<IUploadTicket>;
|
|
34
|
+
uploadFile(path: string, file: File): Promise<string>;
|
|
35
|
+
uploadMinioFile(minioConfig: MinioConfig, file: File): Promise<string>;
|
|
36
|
+
getRecommendQues(appId: string): Promise<IQuestion[]>;
|
|
37
|
+
postPrompts(appId: string, params: IPromptParam): Promise<{
|
|
38
|
+
id: string;
|
|
39
|
+
}>;
|
|
40
|
+
listPrompt(appId: string, params?: {
|
|
41
|
+
title?: string;
|
|
42
|
+
type?: IPromptType;
|
|
43
|
+
}): Promise<IPrompt[]>;
|
|
44
|
+
getPrompt(appId: string, id: string): Promise<IPrompt>;
|
|
45
|
+
updatePrompt(appId: string, id: string, params: IPromptParam): Promise<string>;
|
|
46
|
+
deletePrompt(appId: string, id: string): Promise<string>;
|
|
47
|
+
postGeneques(params: {
|
|
48
|
+
content: string;
|
|
49
|
+
}, config?: AxiosRequestConfig): Promise<IGeneques>;
|
|
50
|
+
getApplicationIdSessionKnowledgeFiles(appId: string, sessionId: string, params?: {
|
|
51
|
+
enabled: number;
|
|
52
|
+
}): Promise<KnowledgeFileMetadata[]>;
|
|
53
|
+
checkFileReady(appId: string, sessionId: string, fileId?: string, shouldContinueFunc?: () => boolean, interval?: number, upateFileFn?: any): Promise<KnowledgeFileMetadata | null>;
|
|
54
|
+
getApplicationIdSessionKnowledgeFileId(appId: string, sessionId: string, fileId: string, params?: any, errInvisable?: boolean): Promise<KnowledgeFileMetadata>;
|
|
55
|
+
delApplicationIdSessionKnowledgeFileId(appId: string, sessionId: string, fileId: string): Promise<string>;
|
|
56
|
+
postApplicationIdSessionKnowledgeSessionFile(appId: string, sessionId: string, data: KnowledgeFileMetadataParams, params?: any, config?: AxiosRequestConfig): Promise<string>;
|
|
57
|
+
delApplicationIdSessionKnowledgeFile(appId: string, sessionId: string, params: {
|
|
58
|
+
files: IFileParams[];
|
|
59
|
+
}): Promise<any>;
|
|
60
|
+
deleteSessionKnowledgeFiles(sessionId: string, params: {
|
|
61
|
+
files: IFileParams[];
|
|
62
|
+
}): Promise<any>;
|
|
63
|
+
patchApplicationIdKnowledgeIdFileId(appId: string, sessionId: string, fid: string, params: IKnowledgeFileParams): Promise<IFile>;
|
|
64
|
+
getApplicationIdSessionIdPromptVariables(appId: string, sessionId: string): Promise<ISessionPrompt[]>;
|
|
65
|
+
getApplicationIdPromptVariables(appId: string, params?: {
|
|
66
|
+
status: number;
|
|
67
|
+
}): Promise<IPromptVariables[]>;
|
|
68
|
+
patchApplicationIdSessionpromptVariablesId(appId: string, sid: string, id: string, params: Partial<ISessionPrompt>): Promise<IPrompt[]>;
|
|
69
|
+
updateSession(appId: any, sid: string, params: ISessionParam): Promise<string>;
|
|
70
|
+
getSession(appId: string, sid: string): Promise<ISession>;
|
|
71
|
+
}
|
|
72
|
+
export * from './model';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface IBaseModel {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
baseModelName: string;
|
|
5
|
+
maxModelLength: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IUploadTicket {
|
|
8
|
+
minio: {
|
|
9
|
+
accessKey: string;
|
|
10
|
+
secretKey: string;
|
|
11
|
+
bucket: string;
|
|
12
|
+
expiredAt: number;
|
|
13
|
+
prefix: string;
|
|
14
|
+
endpoints: string[];
|
|
15
|
+
region: string;
|
|
16
|
+
useSSL: boolean;
|
|
17
|
+
fileKeys: string[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface IUploadParam {
|
|
21
|
+
files: string[];
|
|
22
|
+
isv: string;
|
|
23
|
+
knowledgeId: string;
|
|
24
|
+
}
|
|
25
|
+
export interface MinioConfig {
|
|
26
|
+
accessKey: string;
|
|
27
|
+
secretKey: string;
|
|
28
|
+
bucket: string;
|
|
29
|
+
expiredAt: number;
|
|
30
|
+
prefix: string;
|
|
31
|
+
endpoints: string[];
|
|
32
|
+
region: string;
|
|
33
|
+
useSSL: boolean;
|
|
34
|
+
fileKeys: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface ISessionParams {
|
|
37
|
+
name?: string;
|
|
38
|
+
netOpen?: number;
|
|
39
|
+
}
|
|
@@ -292,6 +292,12 @@ export interface IHistory {
|
|
|
292
292
|
reference?: IReference[];
|
|
293
293
|
fileId?: string;
|
|
294
294
|
}
|
|
295
|
+
export interface IRelatedQuestionApp {
|
|
296
|
+
appId?: string;
|
|
297
|
+
preinstalled?: boolean;
|
|
298
|
+
includeUserQuestion?: boolean;
|
|
299
|
+
includeAiAnswer?: boolean;
|
|
300
|
+
}
|
|
295
301
|
export interface IArrange {
|
|
296
302
|
llmModel: string;
|
|
297
303
|
prePrompt: string;
|
|
@@ -302,10 +308,14 @@ export interface IArrange {
|
|
|
302
308
|
textFilter: number;
|
|
303
309
|
roleCognition: string;
|
|
304
310
|
repetitionPenalty: number;
|
|
311
|
+
temperatureEnabled?: boolean;
|
|
312
|
+
llmTopPEnabled?: boolean;
|
|
313
|
+
repetitionPenaltyEnabled?: boolean;
|
|
305
314
|
embeddingService: string;
|
|
306
315
|
enableNetOpen: boolean;
|
|
307
316
|
openingContent?: string;
|
|
308
317
|
recommendQuestionOpen?: boolean;
|
|
318
|
+
relatedQuestionApp?: IRelatedQuestionApp;
|
|
309
319
|
thinkingModeOpen?: boolean;
|
|
310
320
|
thinkingTextOpen?: boolean;
|
|
311
321
|
}
|