-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEvents.cs
More file actions
33 lines (21 loc) · 1.21 KB
/
Events.cs
File metadata and controls
33 lines (21 loc) · 1.21 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
using ManagedCode.CodexSharpSDK.Internal;
namespace ManagedCode.CodexSharpSDK.Models;
public sealed record Usage(int InputTokens, int CachedInputTokens, int OutputTokens);
public sealed record ThreadError(string Message);
public abstract record ThreadEvent(string Type);
public sealed record ThreadStartedEvent(string ThreadId)
: ThreadEvent(CodexProtocolConstants.EventTypes.ThreadStarted);
public sealed record TurnStartedEvent()
: ThreadEvent(CodexProtocolConstants.EventTypes.TurnStarted);
public sealed record TurnCompletedEvent(Usage Usage)
: ThreadEvent(CodexProtocolConstants.EventTypes.TurnCompleted);
public sealed record TurnFailedEvent(ThreadError Error)
: ThreadEvent(CodexProtocolConstants.EventTypes.TurnFailed);
public sealed record ItemStartedEvent(ThreadItem Item)
: ThreadEvent(CodexProtocolConstants.EventTypes.ItemStarted);
public sealed record ItemUpdatedEvent(ThreadItem Item)
: ThreadEvent(CodexProtocolConstants.EventTypes.ItemUpdated);
public sealed record ItemCompletedEvent(ThreadItem Item)
: ThreadEvent(CodexProtocolConstants.EventTypes.ItemCompleted);
public sealed record ThreadErrorEvent(string Message)
: ThreadEvent(CodexProtocolConstants.EventTypes.Error);