mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 19:16:33 +00:00
Errors sending to UI
notifying client of AI model conversion
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
namespace Azaion.CommonSecurity.DTO.Commands;
|
||||
|
||||
[MessagePackObject]
|
||||
public class RemoteCommand(CommandType commandType, byte[]? data = null)
|
||||
public class RemoteCommand(CommandType commandType, byte[]? data = null, string? message = null)
|
||||
{
|
||||
[Key("CommandType")]
|
||||
public CommandType CommandType { get; set; } = commandType;
|
||||
@@ -11,11 +11,14 @@ public class RemoteCommand(CommandType commandType, byte[]? data = null)
|
||||
[Key("Data")]
|
||||
public byte[]? Data { get; set; } = data;
|
||||
|
||||
[Key("Message")]
|
||||
public string? Message { get; set; } = message;
|
||||
|
||||
public static RemoteCommand Create(CommandType commandType) =>
|
||||
new(commandType);
|
||||
|
||||
public static RemoteCommand Create<T>(CommandType commandType, T data) where T : class =>
|
||||
new(commandType, MessagePackSerializer.Serialize(data));
|
||||
public static RemoteCommand Create<T>(CommandType commandType, T data, string? message = null) where T : class =>
|
||||
new(commandType, MessagePackSerializer.Serialize(data), message);
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
@@ -34,7 +37,12 @@ public enum CommandType
|
||||
None = 0,
|
||||
Login = 10,
|
||||
Load = 20,
|
||||
DataBytes = 25,
|
||||
Inference = 30,
|
||||
InferenceData = 35,
|
||||
StopInference = 40,
|
||||
Exit = 100
|
||||
AIAvailabilityCheck = 80,
|
||||
AIAvailabilityResult = 85,
|
||||
Error = 90,
|
||||
Exit = 100,
|
||||
}
|
||||
Reference in New Issue
Block a user