Skip to content

Commit

Permalink
Code(API::ChatSession): Add ChatSession model
Browse files Browse the repository at this point in the history
  • Loading branch information
ktutak1337 committed Mar 26, 2024
1 parent 0fc06e3 commit e9a6e75
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Server/StellarChat.Server.Api/Models/Chat/ChatSession.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace StellarChat.Server.Api.Models.Chat;

public class ChatSession
{
public Guid Id { get; set; }
public string Title { get; set; }
public string Metaprompt { get; set; }
public HashSet<string> ActivePlugins { get; set; } = new();
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }

public ChatSession(Guid id, string title, string metaprompt, HashSet<string> activePlugins, DateTimeOffset createdAt, DateTimeOffset updatedAt)
{
Id = id;
Title = title;
Metaprompt = metaprompt;
ActivePlugins = activePlugins;
CreatedAt = createdAt;
UpdatedAt = updatedAt;
}

public static ChatSession Create(Guid id, string title, string metaprompt, HashSet<string> activePlugins, DateTimeOffset createdAt, DateTimeOffset updatedAt)
=> new(id, title, metaprompt, activePlugins, createdAt, updatedAt);
}

0 comments on commit e9a6e75

Please sign in to comment.