update conversation

This commit is contained in:
AceDataCloud committed 2023-09-30 14:01:11 +08:00
1 parent f831411078
commit ddd3910e7d
4 files changed
+149 -4

No files matched your search

+7 -2
View File
@@ -17,9 +17,14 @@ export enum IMessageState {
FAILED = 'failed'
}
export const ROLE_SYSTEM = 'system';
export const ROLE_ASSISTANT = 'assistant';
export const ROLE_USER = 'user';
export interface IMessage {
state?: IMessageState;
content: IContent;
author: IUser | IBot;
content: string;
author?: IUser | IBot;
role?: typeof ROLE_SYSTEM | typeof ROLE_ASSISTANT | typeof ROLE_USER;
error?: IError;
}