Class GetSnapshotOptions

java.lang.Object
com.google.genkit.ai.agent.GetSnapshotOptions

public final class GetSnapshotOptions extends Object
Options for retrieving a session snapshot.

Exactly one of snapshotId or sessionId must be set by callers. When snapshotId is set the store returns that specific snapshot. When sessionId is set the store resolves and returns the latest leaf snapshot for that session.

  • Method Details

    • getSnapshotId

      public String getSnapshotId()
      Returns the specific snapshot ID to retrieve, or null if not set.
      Returns:
      the snapshot ID
    • getSessionId

      public String getSessionId()
      Returns the session ID whose latest leaf snapshot should be retrieved, or null if not set.
      Returns:
      the session ID
    • builder

      public static GetSnapshotOptions.Builder builder()
      Creates a new builder for GetSnapshotOptions.
      Returns:
      a new builder