GeezerVison is showing adk.dev — InMemoryArtifactService | ADK for TypeScript: API Reference - v2.5.0
Class InMemoryArtifactService
An in-memory implementation of the ArtifactService.
Constructors
Methods
deleteArtifact
-
Returns Promise<void>
A promise that resolves when the artifact is deleted.
getArtifactVersion
-
Gets metadata for a specific artifact version.
A promise that resolves to the artifact version metadata or undefined.
listArtifactKeys
-
Lists all the artifact filenames within a session.
Returns Promise<string[]>
A promise that resolves to a list of all artifact filenames within
a session.
listArtifactVersions
-
Lists metadata for each artifact version.
A promise that resolves to a list of artifact version metadata.
listVersions
-
Lists all versions of an artifact.
Returns Promise<number[]>
A promise that resolves to a list of all available versions of the
artifact.
loadArtifact
-
Gets an artifact from the artifact service storage.
The artifact is a file identified by the app name, user ID, session ID, and
filename.
Returns Promise<Part | undefined>
A promise that resolves to the artifact or undefined if not found.
saveArtifact
-
Saves an artifact to the artifact service storage.
The artifact is a file identified by the app name, user ID, session ID, and
filename. After saving the artifact, a revision ID is returned to identify
the artifact version.
Returns Promise<number>
A promise that resolves to The revision ID. The first version of
the artifact has a revision ID of 0. This is incremented by 1 after each
successful save.