Skip to content

Commit 02348a1

Browse files
committed
gpt?
1 parent cc9d527 commit 02348a1

File tree

4 files changed

+622
-93
lines changed

4 files changed

+622
-93
lines changed

Content.Server/Backmen/NPC/Components/NPCConversationComponent.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Content.Server.Backmen.NPC.Components;
88

9+
[AutoGenerateComponentPause]
910
[RegisterComponent]
1011
[Access(typeof(NPCConversationSystem))]
1112
public sealed partial class NPCConversationComponent : Component
@@ -74,6 +75,7 @@ public sealed partial class NPCConversationComponent : Component
7475
/// </summary>
7576
[ViewVariables]
7677
[DataField("nextResponse", customTypeSerializer: typeof(TimeOffsetSerializer))]
78+
[AutoPausedField]
7779
public TimeSpan NextResponse;
7880

7981
/// <summary>
@@ -148,5 +150,29 @@ public sealed partial class NPCConversationComponent : Component
148150

149151
#endregion
150152

153+
#region GPT Integration
154+
155+
/// <summary>
156+
/// Whether or not the NPC should use GPT API for responses when no matching topic is found.
157+
/// </summary>
158+
[ViewVariables(VVAccess.ReadWrite)]
159+
[DataField("useGpt")]
160+
public bool UseGpt = false;
161+
162+
/// <summary>
163+
/// System prompt for GPT to define NPC's personality and behavior.
164+
/// </summary>
165+
[ViewVariables(VVAccess.ReadWrite)]
166+
[DataField("gptSystemPrompt")]
167+
public string? GptSystemPrompt;
168+
169+
/// <summary>
170+
/// Whether GPT is currently processing a request.
171+
/// </summary>
172+
[ViewVariables]
173+
public bool GptProcessing = false;
174+
175+
#endregion
176+
151177
}
152178

0 commit comments

Comments
 (0)