-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateAgentProfileCommand.cs
More file actions
43 lines (33 loc) · 1.25 KB
/
CreateAgentProfileCommand.cs
File metadata and controls
43 lines (33 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using ManagedCode.Communication.Commands;
namespace DotPilot.Core.ChatSessions.Commands;
public sealed class CreateAgentProfileCommand : Command<CreateAgentProfileCommand.Payload>
{
private readonly Payload payload;
public CreateAgentProfileCommand(
string name,
AgentProviderKind providerKind,
string modelName,
string systemPrompt,
string description = "")
: this(new Payload(name, providerKind, modelName, systemPrompt, description))
{
}
private CreateAgentProfileCommand(Payload payload)
: base(Guid.CreateVersion7(), nameof(CreateAgentProfileCommand), payload)
{
this.payload = payload;
Value = payload;
}
public string Name => payload.Name;
public AgentProviderKind ProviderKind => payload.ProviderKind;
public string ModelName => payload.ModelName;
public string SystemPrompt => payload.SystemPrompt;
public string Description => payload.Description;
[GenerateSerializer]
public sealed record Payload(
[property: Id(0)] string Name,
[property: Id(1)] AgentProviderKind ProviderKind,
[property: Id(2)] string ModelName,
[property: Id(3)] string SystemPrompt,
[property: Id(4)] string Description);
}