using System; using System.Collections.Generic; namespace LLM { // 数据模型 (保持简单,适配 JsonUtility) [Serializable] public class Message { public string role; public string content; } [Serializable] public class ChatRequest { public string model; public List messages; public bool stream = false; } // 适配 API 响应结构 [Serializable] public class ChatResponse { public Choice[] choices; } [Serializable] public class Choice { public Message message; } }