export interface IChatWithLLMRequest {
  messages: Message[];
  /**
   * 要使用的模型的 ID
   */
  model: string;
}

export interface Message {
  content?: string;
  thinking?: string;
  role?: string;
  usage?: UsageInfo;
  id?: string;
  type?: "chat" | "voice";
  [property: string]: any;
}

export interface ModelInfo {
  model_id: string;
  model_name: string;
  model_type: string;
}

export interface ModelListInfo {
  vendor: string;
  models: ModelInfo[];
}

export interface UsageInfo {
  prompt_tokens: number;
  completion_tokens: number;
  total_tokens: number;
}

/**
 * Speaker 语音合成器基本信息
 */
export interface Speaker {
  /** speaker唯一标识ID */
  speaker_id: string;
  /** speaker显示名称 */
  speaker_name: string;
  /** 支持的语言/口音 */
  language: string;
  /** 支持的平台列表 */
  platforms: string[];
}

/**
 * Speaker分类信息
 */
export interface CategorySpeakers {
  /** 分类名称 */
  category: string;
  /** 该分类下的speaker列表 */
  speakers: Speaker[];
}

/**
 * Speaker分类枚举
 */
export enum SpeakerCategory {
  /** 趣味口音 */
  ACCENT = "趣味口音",
  /** 角色扮演 */
  ROLE_PLAY = "角色扮演"
}

/**
 * 常用平台枚举
 */
export enum SpeakerPlatform {
  DOUYIN = "抖音",
  DOUBAO = "豆包",
  CICI = "Cici",
  JIANYING = "剪映",
  JIANYING_C = "剪映C端",
  WEB_DEMO = "web demo",
  STORY_AI = "StoryAi",
  MAOXIANG = "猫箱"
}

/**
 * Speaker选择器组件Props
 */
export interface SpeakerSelectorProps {
  /** 当前选中的speaker */
  selectedSpeaker?: Speaker;
  /** speaker选择回调 */
  onSpeakerChange: (speaker: Speaker) => void;
  /** 是否禁用 */
  disabled?: boolean;
  /** 过滤特定分类 */
  filterCategories?: SpeakerCategory[];
  /** 过滤特定平台 */
  filterPlatforms?: SpeakerPlatform[];
}

/**
 * 语音合成参数
 */
export interface VoiceSynthesisParams {
  /** 使用的speaker */
  speaker: Speaker;
  /** 要合成的文本 */
  text: string;
  /** 语速 (0.5-2.0) */
  speed?: number;
  /** 音调 (0.5-2.0) */
  pitch?: number;
  /** 音量 (0.0-1.0) */
  volume?: number;
}

/**
 * 语音合成响应
 */
export interface VoiceSynthesisResponse {
  /** 音频文件URL */
  audio_url: string;
  /** 音频时长(秒) */
  duration: number;
  /** 合成状态 */
  status: "success" | "error";
  /** 错误信息 */
  error_message?: string;
}
