Files
Echo/Assets/_Project/Scripts/LLM Manager/LLMDataModels.cs
T

35 lines
617 B
C#
Raw Normal View History

2026-07-08 19:53:15 +08:00
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<Message> messages;
public bool stream = false;
}
// 适配 API 响应结构
[Serializable]
public class ChatResponse
{
public Choice[] choices;
}
[Serializable]
public class Choice
{
public Message message;
}
}