1
This commit is contained in:
@@ -6,24 +6,10 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "KBAiChatMessage.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 消息类型
|
||||
typedef NS_ENUM(NSInteger, KBAiChatMessageType) {
|
||||
KBAiChatMessageTypeUser, // 用户消息
|
||||
KBAiChatMessageTypeAssistant // AI 回复
|
||||
};
|
||||
|
||||
/// 聊天消息模型
|
||||
@interface KBAiChatMessage : NSObject
|
||||
@property(nonatomic, assign) KBAiChatMessageType type;
|
||||
@property(nonatomic, copy) NSString *text;
|
||||
@property(nonatomic, assign) BOOL isComplete; // 是否完成(用于打字机效果)
|
||||
+ (instancetype)userMessageWithText:(NSString *)text;
|
||||
+ (instancetype)assistantMessageWithText:(NSString *)text;
|
||||
@end
|
||||
|
||||
/// 聊天视图
|
||||
/// 显示用户消息和 AI 回复的气泡列表
|
||||
@interface KBAiChatView : UIView
|
||||
|
||||
Reference in New Issue
Block a user