commit 4146e420feb1963cfa8c8e094b2ed425c48ec178 Author: Hadi Khazaee Asl Date: Fri Apr 24 00:30:14 2026 +0330 Initial Commit ... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d4a6c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin +obj \ No newline at end of file diff --git a/Configurations/.gitkeep b/Configurations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Constants/.gitkeep b/Constants/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Constants/XAiChatRole.cs b/Constants/XAiChatRole.cs new file mode 100644 index 0000000..1b860a7 --- /dev/null +++ b/Constants/XAiChatRole.cs @@ -0,0 +1,27 @@ +using xExceptions.Attributes; + +namespace xAiModels.Constants +{ + public struct XAiChatRoles + { + public const string None = "none"; + public const string User = "user"; + public const string Tool = "tool"; + public const string System = "system"; + public const string Assistant = "assistant"; + } + + public enum XAiChatRole + { + [StringValue(XAiChatRoles.None)] + None, + [StringValue(XAiChatRoles.User)] + User, + [StringValue(XAiChatRoles.Tool)] + Tool, + [StringValue(XAiChatRoles.System)] + System, + [StringValue(XAiChatRoles.Assistant)] + Assistant, + } +} \ No newline at end of file diff --git a/Models/XAiConversationDto.cs b/Models/XAiConversationDto.cs new file mode 100644 index 0000000..48286b6 --- /dev/null +++ b/Models/XAiConversationDto.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using xModels.Base; + +namespace xAiModels.Models +{ + /// + /// Conversation Describe ... + /// + public class XAiConversationDto : XBaseDto + { + /// + /// Id of Conversation ... + /// + public Guid Id { get; set; } + + /// + /// Title of Conversation ... + /// + public string Title { get; set; } + + /// + /// Created Time ... + /// + public DateTime CreatedOn { get; set; } + + /// + /// Updated Time ... + /// + public DateTime UpdatedAt { get; set; } + + /// + /// Messages of Conversation ... + /// + public IEnumerable Messages { get; set; } + + /// + /// Project ID ... + /// + public Guid ProjectId { get; set; } + + /// + /// Project ... + /// + public XAiProjectDto Project { get; set; } + } +} \ No newline at end of file diff --git a/Models/XAiMessageDto.cs b/Models/XAiMessageDto.cs new file mode 100644 index 0000000..2101a25 --- /dev/null +++ b/Models/XAiMessageDto.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using xAiModels.Constants; +using xModels.Base; + +namespace xAiModels.Models +{ + /// + /// Message Model of Ai ... + /// + public class XAiMessageDto : XBaseDto + { + /// + /// Id of Message ... + /// + public Guid Id { get; set; } + + /// + /// Message of Chat ... + /// + public string Content { get; set; } + + /// + /// Role of Message ... + /// + public XAiChatRole Role { get; set; } + + /// + /// Created Time ... + /// + public DateTime CreatedOn { get; set; } + + /// + /// Updated Time ... + /// + public DateTime UpdatedAt { get; set; } + + /// + /// Conversation Id ... + /// + public Guid ConversationId { get; set; } + + /// + /// Conversation ... + /// + public XAiConversationDto Conversation { get; set; } + + } +} \ No newline at end of file diff --git a/Models/XAiProjectDto.cs b/Models/XAiProjectDto.cs new file mode 100644 index 0000000..a134ead --- /dev/null +++ b/Models/XAiProjectDto.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using xModels.Base; + +namespace xAiModels.Models +{ + /// + /// an Ai Project is a Conceptual Separation of AI Conversations ... + /// + public class XAiProjectDto : XBaseDto + { + /// + /// Id of Project ... + /// + public Guid Id { get; set; } + + /// + /// Title of Project ... + /// + public string Title { get; set; } + + /// + /// Description of Project ... + /// + public string Description { get; set; } + + /// + /// a Prompt for Project Start ... + /// + public string Prompt { get; set; } + + /// + /// Created Time ... + /// + public DateTime CreatedOn { get; set; } + + /// + /// Updated Time ... + /// + public DateTime UpdatedAt { get; set; } + + /// + /// Conversations ... + /// + public IEnumerable Conversations { get; set; } + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..660bf86 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# xSaherelm.xAiModels + +it is a Part of xSaherElm project which Provides all Models which used in Ai Service ... + +## Maintainer + +Hadi Khazaee asl + +[https://www.saherelm.ir](https://www.saherelm.ir) + +[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com) diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..184cdea --- /dev/null +++ b/nuget.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/xAiModels.csproj b/xAiModels.csproj new file mode 100644 index 0000000..a9040c7 --- /dev/null +++ b/xAiModels.csproj @@ -0,0 +1,34 @@ + + + + netstandard2.0 + xSaherelm.xAiModels + 1.0.0 + Hadi Khazaee Asl + SaherElm IT Center + + it is a Part of xSaherElm project which Provides all Models which used in Ai Service ... + + + + icon.png + + + + + + + + + + + + + + + + + + + \ No newline at end of file