Package com.google.genkit.ai.agent
Interface SnapshotReader<S>
- Type Parameters:
S- the type of custom session state
- All Known Subinterfaces:
SessionStore<S>
- All Known Implementing Classes:
CosmosSessionStore,DynamoDbSessionStore,FileSessionStore,FirestoreSessionStore,InMemorySessionStore,MongoSessionStore,PostgresSessionStore
public interface SnapshotReader<S>
Read side of a session store.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a session snapshot.
-
Method Details
-
getSnapshot
Retrieves a session snapshot.When
GetSnapshotOptions.getSnapshotId()is set the store returns that specific snapshot. WhenGetSnapshotOptions.getSessionId()is set the store resolves and returns the latest leaf snapshot for that session. Returnsnullif no matching snapshot exists.- Parameters:
opts- options specifying which snapshot to retrieve; exactly one ofsnapshotId/sessionIdmust be set- Returns:
- the matching snapshot, or
nullif none exists
-