feat: 完成ai message、session搭建

This commit is contained in:
ccnetcore
2025-06-21 13:02:38 +08:00
parent 29985e2118
commit ac04e846fa
18 changed files with 353 additions and 58 deletions

View File

@@ -0,0 +1,15 @@
using Volo.Abp.Application.Dtos;
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
public class MessageDto : FullAuditedEntityDto<Guid>
{
public Guid UserId { get; set; }
public Guid SessionId { get; set; }
public string Content { get; set; }
public string Role { get; set; }
public decimal DeductCost { get; set; }
public decimal TotalTokens { get; set; }
public string ModelId { get; set; }
public string Remark { get; set; }
}

View File

@@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
public class MessageGetListInput:PagedAllResultRequestDto
{
[Required]
public Guid SessionId { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
public class MessageInputDto
{
public string Content { get; set; }
public string Role { get; set; }
public decimal DeductCost { get; set; }
public decimal TotalTokens { get; set; }
public string ModelId { get; set; }
public string Remark { get; set; }
}

View File

@@ -4,6 +4,8 @@ public class SendMessageInput
{
public List<Message> Messages { get; set; }
public string Model { get; set; }
public Guid? SessionId{ get; set; }
}
public class Message

View File

@@ -0,0 +1,10 @@
using Volo.Abp.Application.Dtos;
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
public class SessionDto : FullAuditedEntityDto<Guid>
{
public string SessionTitle { get; set; }
public string SessionContent { get; set; }
public string Remark { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
public class SessionGetListInput
{
}

View File

@@ -0,0 +1,9 @@
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
public class SessionInputDto
{
public Guid UserId { get; set; }
public string SessionTitle { get; set; }
public string SessionContent { get; set; }
public string Remark { get; set; }
}