-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code(API::ChatSession): Add ChatSession model
- Loading branch information
1 parent
0fc06e3
commit e9a6e75
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/Server/StellarChat.Server.Api/Models/Chat/ChatSession.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |