package ai

import "context"

// AIClient AI 模型客户端统一接口
type AIClient interface {
	// Chat 发送消息并获取完整回复
	Chat(ctx context.Context, req *ChatRequest) (*ChatResponse, error)
	// Name 返回客户端名称
	Name() string
}

// ChatRequest AI 请求
type ChatRequest struct {
	SystemPrompt string      // 系统提示词
	UserMessage  string      // 用户消息
	Files        []FileInput // 可选：要分析的文件（新增，用于 OpenAI Files API）
	MaxTokens    int         // 最大输出 token 数
	Temperature  float64     // 温度参数
}

// FileInput 文件输入（用于文档分析场景）
type FileInput struct {
	Content  []byte // 文件内容
	Name     string // 文件名（用于上传）
	MimeType string // MIME 类型（如 "application/json"）
}

// ChatResponse AI 响应
type ChatResponse struct {
	Content      string // AI 生成的内容
	Model        string // 实际使用的模型
	InputTokens  int    // 输入 token 数
	OutputTokens int    // 输出 token 数
}
