last ...
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using xModels.Base;
|
||||
using xModels.Dtos;
|
||||
|
||||
namespace xAiModels.Models
|
||||
namespace xAiModels.Models.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Conversation Describe ...
|
||||
/// </summary>
|
||||
public class XAiConversationDto : XBaseDto
|
||||
public class XAiConversationDto : XBaseGuidIDEntityDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of Conversation ...
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Owner Info ...
|
||||
/// </summary>
|
||||
public virtual XPersonDto Owner { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Title of Conversation ...
|
||||
@@ -30,26 +35,12 @@ namespace xAiModels.Models
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Messages of Conversation ...
|
||||
/// </summary>
|
||||
public IEnumerable<XAiMessageDto> Messages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
public XPersonDto Owner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Project ID ...
|
||||
/// </summary>
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Project ...
|
||||
/// </summary>
|
||||
public XAiProjectDto Project { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
public virtual string ProjectTitle { get; set; } = null;
|
||||
public virtual string ProjectDescription { get; set; } = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using xAiModels.Constants;
|
||||
using xCommons.Extensions;
|
||||
using xModels.Base;
|
||||
using xModels.Dtos;
|
||||
|
||||
namespace xAiModels.Models.Dtos
|
||||
{
|
||||
public class XAiMessageDto : XBaseGuidIDEntityDto
|
||||
{
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Owner Info ...
|
||||
/// </summary>
|
||||
public virtual XPersonDto Owner { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Message of Chat ...
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Role of Message ...
|
||||
/// </summary>
|
||||
public XAiChatRole Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created Time ...
|
||||
/// </summary>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated Time ...
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversation Id ...
|
||||
/// </summary>
|
||||
public Guid ConversationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversation Info ...
|
||||
/// </summary>
|
||||
public virtual XAiConversationDto Conversation { get; set; } = null;
|
||||
|
||||
//
|
||||
#region Meta Data Property ...
|
||||
private string _metadata;
|
||||
|
||||
/// <summary>
|
||||
/// Meta Data of Message ...
|
||||
/// </summary>
|
||||
public IDictionary<string, object> Metadata { get; private set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Meta Data of MEssage in Json ...
|
||||
/// </summary>
|
||||
public string MeatDatas
|
||||
{
|
||||
//
|
||||
get => _metadata;
|
||||
|
||||
//
|
||||
set
|
||||
{
|
||||
//
|
||||
// Converts Json String to Dictionary ...
|
||||
if (!value.IsNullOrEmpty())
|
||||
{
|
||||
Metadata = value.FromJSON<IDictionary<string, object>>();
|
||||
}
|
||||
|
||||
//
|
||||
_metadata = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,17 +3,23 @@ using System.Collections.Generic;
|
||||
using xModels.Base;
|
||||
using xModels.Dtos;
|
||||
|
||||
namespace xAiModels.Models
|
||||
namespace xAiModels.Models.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// an Ai Project is a Conceptual Separation of AI Conversations ...
|
||||
/// Describe a Project ...
|
||||
/// </summary>
|
||||
public class XAiProjectDto : XBaseDto
|
||||
public class XAiProjectDto : XBaseGuidIDEntityDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of Project ...
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Owner Info ...
|
||||
/// </summary>
|
||||
public virtual XPersonDto Owner { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Title of Project ...
|
||||
@@ -40,16 +46,9 @@ namespace xAiModels.Models
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
public XPersonDto Owner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversations ...
|
||||
/// </summary>
|
||||
public IEnumerable<XAiConversationDto> Conversations { get; set; }
|
||||
public virtual IList<XAiConversationDto> Conversations { get; set; } = [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xAiModels.Models.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Conversation Describe ...
|
||||
/// </summary>
|
||||
public class XAiConversation : XBaseGuidIDEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Title of Conversation ...
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created Time ...
|
||||
/// </summary>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated Time ...
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Project ID ...
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid ProjectId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using xAiModels.Constants;
|
||||
using xCommons.Extensions;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xAiModels.Models.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Message Model of Ai ...
|
||||
/// </summary>
|
||||
public class XAiMessage : XBaseGuidIDEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Message of Chat ...
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Role of Message ...
|
||||
/// </summary>
|
||||
public XAiChatRole Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created Time ...
|
||||
/// </summary>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated Time ...
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversation Id ...
|
||||
/// </summary>
|
||||
[StringLength(255)]
|
||||
public Guid ConversationId { get; set; }
|
||||
|
||||
//
|
||||
#region Meta Data Property ...
|
||||
private string _metadata;
|
||||
|
||||
/// <summary>
|
||||
/// Meta Data of Message ...
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public IDictionary<string, object> Metadata { get; private set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Meta Data of MEssage in Json ...
|
||||
/// </summary>
|
||||
public string MeatDatas
|
||||
{
|
||||
//
|
||||
get => _metadata;
|
||||
|
||||
//
|
||||
set
|
||||
{
|
||||
//
|
||||
// Converts Json String to Dictionary ...
|
||||
if (!value.IsNullOrEmpty())
|
||||
{
|
||||
Metadata = value.FromJSON<IDictionary<string, object>>();
|
||||
}
|
||||
|
||||
//
|
||||
_metadata = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xAiModels.Models.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Describe a Project ...
|
||||
/// </summary>
|
||||
public class XAiProject : XBaseGuidIDEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Title of Project ...
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Description of Project ...
|
||||
/// </summary>
|
||||
[StringLength(1000)]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// a Prompt for Project Start ...
|
||||
/// </summary>
|
||||
public string Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created Time ...
|
||||
/// </summary>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated Time ...
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
using System;
|
||||
using xAiModels.Constants;
|
||||
using xModels.Base;
|
||||
using xModels.Dtos;
|
||||
|
||||
namespace xAiModels.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Message Model of Ai ...
|
||||
/// </summary>
|
||||
public class XAiMessageDto : XBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of Message ...
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Message of Chat ...
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Role of Message ...
|
||||
/// </summary>
|
||||
public XAiChatRole Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created Time ...
|
||||
/// </summary>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated Time ...
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
public XPersonDto Owner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversation Id ...
|
||||
/// </summary>
|
||||
public Guid ConversationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversation ...
|
||||
/// </summary>
|
||||
public XAiConversationDto Conversation { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using xAiModels.Constants;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xAiModels.Models
|
||||
{
|
||||
public class XAiMessageUpdateDto : XBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Message Sequence ...
|
||||
/// </summary>
|
||||
public long Sequense { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id of Message ...
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Message of Chat ...
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Role of Message ...
|
||||
/// </summary>
|
||||
public XAiChatRole Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated Time ...
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User Identifier ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Conversation Id ...
|
||||
/// </summary>
|
||||
public Guid ConversationId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user