feat: 首页数据
This commit is contained in:
13
model/ChatModel.js
Normal file
13
model/ChatModel.js
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
export const MessageRole = {
|
||||
AI: "AI",
|
||||
ME: "ME",
|
||||
OTHER: "OTHER"
|
||||
}
|
||||
|
||||
export const MessageType = {
|
||||
TEXT: 'TEXT',
|
||||
IMAGE: 'IMAGE'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
export enum MessageRole {
|
||||
AI = "AI",
|
||||
ME = "ME",
|
||||
OTHER = "OTHER"
|
||||
}
|
||||
|
||||
export enum MessageType {
|
||||
TEXT = 'TEXT',
|
||||
IMAGE = 'IMAGE'
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface TextContent {
|
||||
type: MessageType;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface ImageContent {
|
||||
type: MessageType;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export type MessageContent = TextContent | ImageContent;
|
||||
|
||||
export interface ChatModel {
|
||||
msgId: string;
|
||||
msgType: MessageRole;
|
||||
msg: string;
|
||||
msgContent?: MessageContent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user