export interface Message { id: number; role: 'user' | 'avatar'; content: string; } export interface StarCategory { id: string; name: string; description: string; image: string | null; } export interface StarBase { uid: string; name: string; profile_pic: string | null; banner_pic: string | null; description: string; profile_vid: string | null; } export interface InteractiveConfig { uid: string; type: 'visual' | 'audio'; llm_mode: 'standalone' | 'external'; video: string | null; video_idle: string | null; segmented_video: string | null; parameters: object; } export interface Star extends StarBase { category: Pick; interactive_character_uid: string | null; interactive_config: InteractiveConfig | null; } export interface ChatReplyParam { conversation_uid: string; message: string; } export interface DemoChatReplyParam { character_slug: string; remote_id: string; message: string; bearer_token: string; } export interface ConversationMessage { uid: string; content: string; sender: 'human' | 'ai'; created_at: string; } export interface AudioStream { value: Uint8Array; type: 'audio'; } export type MsgRole = 'human' | 'ai'; export interface TextStream { value: string; type: 'text'; role: MsgRole; } export interface TextSteamChunk { content: string; type: MsgRole; } export type Stream = AudioStream | TextStream;