-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateAgentProfileCommand.cs
More file actions
47 lines (36 loc) · 1.4 KB
/
UpdateAgentProfileCommand.cs
File metadata and controls
47 lines (36 loc) · 1.4 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
44
45
46
47
using ManagedCode.Communication.Commands;
namespace DotPilot.Core.ChatSessions.Commands;
public sealed class UpdateAgentProfileCommand : Command<UpdateAgentProfileCommand.Payload>
{
private readonly Payload payload;
public UpdateAgentProfileCommand(
AgentProfileId agentId,
string name,
AgentProviderKind providerKind,
string modelName,
string systemPrompt,
string description = "")
: this(new Payload(agentId, name, providerKind, modelName, systemPrompt, description))
{
}
private UpdateAgentProfileCommand(Payload payload)
: base(Guid.CreateVersion7(), nameof(UpdateAgentProfileCommand), payload)
{
this.payload = payload;
Value = payload;
}
public AgentProfileId AgentId => payload.AgentId;
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)] AgentProfileId AgentId,
[property: Id(1)] string Name,
[property: Id(2)] AgentProviderKind ProviderKind,
[property: Id(3)] string ModelName,
[property: Id(4)] string SystemPrompt,
[property: Id(5)] string Description);
}