fmode-ng 0.0.8 → 0.0.10
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/esm2020/lib/aigc/service-fmai/service-chat/chat-class.mjs +1 -1
- package/esm2020/lib/aigc/service-fmai/service-chat/chat.service.mjs +1 -1
- package/esm2020/lib/aigc/service-fmai/service-imagine/imagine.service.mjs +1 -1
- package/fesm2015/fmode-ng.mjs +1 -1
- package/fesm2015/fmode-ng.mjs.map +1 -1
- package/fesm2020/fmode-ng.mjs +1 -1
- package/fesm2020/fmode-ng.mjs.map +1 -1
- package/lib/aigc/service-fmai/service-chat/chat-class.d.ts +9 -5
- package/lib/aigc/service-fmai/service-chat/chat.service.d.ts +12 -3
- package/lib/aigc/service-fmai/service-imagine/imagine.service.d.ts +43 -0
- package/package.json +1 -1
|
@@ -5,17 +5,21 @@ export interface FmodeChatMessage {
|
|
|
5
5
|
role: string;
|
|
6
6
|
content: string;
|
|
7
7
|
createdAt?: Date;
|
|
8
|
-
complete?:
|
|
8
|
+
complete?: boolean;
|
|
9
9
|
/**AI回复消息字段 */
|
|
10
10
|
cid?: string;
|
|
11
11
|
}
|
|
12
12
|
export declare class FmodeChat {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
title: string;
|
|
14
|
+
sessionId: string;
|
|
15
|
+
ChatSession: any;
|
|
16
|
+
chatSession: Parse.Object;
|
|
17
|
+
role: any;
|
|
16
18
|
messageList: FmodeChatMessage[];
|
|
17
|
-
constructor(
|
|
19
|
+
constructor(sessionId: string, role?: Parse.Object, chatSession?: Parse.Object);
|
|
18
20
|
sendMessage(message?: string): void;
|
|
21
|
+
saveChatSession(): Promise<void>;
|
|
22
|
+
genTitle(): string;
|
|
19
23
|
fixMessageList(messages: FmodeChatMessage[]): {
|
|
20
24
|
role: string;
|
|
21
25
|
content: string;
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { Router } from '@angular/router';
|
|
2
2
|
import { FmodeChat } from './chat-class';
|
|
3
|
+
import { NovaCloudService } from '../../../nova-cloud';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ChatService {
|
|
5
6
|
private router;
|
|
6
|
-
|
|
7
|
+
private ncloud;
|
|
7
8
|
chatMap: {
|
|
8
9
|
[key: string]: FmodeChat;
|
|
9
10
|
};
|
|
10
|
-
constructor(router: Router);
|
|
11
|
+
constructor(router: Router, ncloud: NovaCloudService);
|
|
12
|
+
initChatMap(sessionId: any): Promise<FmodeChat>;
|
|
13
|
+
chatList: Array<any>;
|
|
14
|
+
getChatSession(): Promise<void>;
|
|
15
|
+
getChatSessionDistinct(): Promise<any[]>;
|
|
11
16
|
/**
|
|
12
17
|
* 重建新对话窗口
|
|
13
18
|
*/
|
|
14
|
-
createChatPanel(
|
|
19
|
+
createChatPanel(role?: any, chat?: any): void;
|
|
20
|
+
restoreChatPanel(options?: {
|
|
21
|
+
rid: string;
|
|
22
|
+
sid: string;
|
|
23
|
+
}): Promise<void>;
|
|
15
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatService, never>;
|
|
16
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<ChatService>;
|
|
17
26
|
}
|
|
@@ -10,6 +10,47 @@ export interface DalleOptions {
|
|
|
10
10
|
size?: "1024x1024" | "1792x1024" | "1024x1792";
|
|
11
11
|
style?: "vivid" | "natural";
|
|
12
12
|
}
|
|
13
|
+
export interface StableDiffusionOptions {
|
|
14
|
+
prompt: string;
|
|
15
|
+
modelStyleId: number;
|
|
16
|
+
negativePrompt?: string;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
steps?: number;
|
|
20
|
+
seed?: number;
|
|
21
|
+
cfgScale?: number;
|
|
22
|
+
hrScale?: number;
|
|
23
|
+
hrSteps?: number;
|
|
24
|
+
upscale?: number;
|
|
25
|
+
batchSize?: number;
|
|
26
|
+
faceFix?: boolean;
|
|
27
|
+
detailsLevel?: number;
|
|
28
|
+
img?: string;
|
|
29
|
+
imgOptions?: imgOptions;
|
|
30
|
+
denoisingStrength?: number;
|
|
31
|
+
controlnet?: {
|
|
32
|
+
units?: ControlnetUnits[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface imgOptions {
|
|
36
|
+
removeBackground?: boolean;
|
|
37
|
+
redrawBackground?: boolean;
|
|
38
|
+
mainObjectType?: "human" | "general";
|
|
39
|
+
facePreservation?: boolean;
|
|
40
|
+
facePreservationCount?: number;
|
|
41
|
+
genderDetect?: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface ControlnetUnits {
|
|
44
|
+
type?: string;
|
|
45
|
+
preprocess?: boolean;
|
|
46
|
+
image?: string;
|
|
47
|
+
controlMode?: number;
|
|
48
|
+
weight?: number;
|
|
49
|
+
controlStart?: number;
|
|
50
|
+
controlEnd?: number;
|
|
51
|
+
paramsA?: number;
|
|
52
|
+
paramsB?: number;
|
|
53
|
+
}
|
|
13
54
|
export declare class ImagineService {
|
|
14
55
|
private http;
|
|
15
56
|
private ncloud;
|
|
@@ -32,6 +73,7 @@ export declare class ImagineService {
|
|
|
32
73
|
*/
|
|
33
74
|
drawDalle(options: DalleOptions): Promise<any>;
|
|
34
75
|
priceDalle(options: DalleOptions): any;
|
|
76
|
+
priceStableDiffusion(options: StableDiffusionOptions): number;
|
|
35
77
|
b64DataToBase64Image(b64_json: any): void;
|
|
36
78
|
/**
|
|
37
79
|
* Huashi6专用绘图函数
|
|
@@ -59,3 +101,4 @@ export declare class ImagineService {
|
|
|
59
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImagineService, never>;
|
|
60
102
|
static ɵprov: i0.ɵɵInjectableDeclaration<ImagineService>;
|
|
61
103
|
}
|
|
104
|
+
export {};
|