mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: [BREAKING] Support Checkpoint Serialization (#735)
* feat: Support Checkpoint Serialization * Implements serialization roundtripping for checkpoints. * Adds support for JSON serialization * Adds FileSystem-based checkpoint persistence * fix: Executor State does not deserialize correctly The StateManager was not properly handling delay-deserialized values. * Fix PortableValue handling in StateManager (this makes it delegate to PortableValue the uwnrapping) * Fix UnitTest to actually test checkpoint serialization * Additional review comment fixes --------- Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
2a04c4197e
commit
2015f0dc09
+4
-4
@@ -34,7 +34,7 @@ public static class Program
|
||||
var workflow = WorkflowHelper.GetWorkflow();
|
||||
|
||||
// Create checkpoint manager
|
||||
var checkpointManager = new CheckpointManager();
|
||||
var checkpointManager = CheckpointManager.Default;
|
||||
var checkpoints = new List<CheckpointInfo>();
|
||||
|
||||
// Execute the workflow and save checkpoints
|
||||
@@ -102,9 +102,9 @@ public static class Program
|
||||
|
||||
private static ExternalResponse HandleExternalRequest(ExternalRequest request)
|
||||
{
|
||||
if (request.Port.Request == typeof(SignalWithNumber))
|
||||
var signal = request.DataAs<SignalWithNumber>();
|
||||
if (signal is not null)
|
||||
{
|
||||
var signal = (SignalWithNumber)request.Data;
|
||||
switch (signal.Signal)
|
||||
{
|
||||
case NumberSignal.Init:
|
||||
@@ -119,7 +119,7 @@ public static class Program
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotSupportedException($"Request {request.Port.Request} is not supported");
|
||||
throw new NotSupportedException($"Request {request.PortInfo.RequestType} is not supported");
|
||||
}
|
||||
|
||||
private static int ReadIntegerFromConsole(string prompt)
|
||||
|
||||
Reference in New Issue
Block a user