Interface BaseArtifactService
- All Known Implementing Classes:
GcsArtifactService
,InMemoryArtifactService
public interface BaseArtifactService
Base interface for artifact services.
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
deleteArtifact
(String appName, String userId, String sessionId, String filename) Deletes an artifact.io.reactivex.rxjava3.core.Single
<ListArtifactsResponse> listArtifactKeys
(String appName, String userId, String sessionId) Lists all the artifact filenames within a session.io.reactivex.rxjava3.core.Single
<com.google.common.collect.ImmutableList<Integer>> listVersions
(String appName, String userId, String sessionId, String filename) Lists all the versions (as revision IDs) of an artifact.io.reactivex.rxjava3.core.Maybe
<com.google.genai.types.Part> loadArtifact
(String appName, String userId, String sessionId, String filename, Optional<Integer> version) Gets an artifact.io.reactivex.rxjava3.core.Single
<Integer> saveArtifact
(String appName, String userId, String sessionId, String filename, com.google.genai.types.Part artifact) Saves an artifact.
-
Method Details
-
saveArtifact
io.reactivex.rxjava3.core.Single<Integer> saveArtifact(String appName, String userId, String sessionId, String filename, com.google.genai.types.Part artifact) Saves an artifact.- Parameters:
appName
- the app nameuserId
- the user IDsessionId
- the session IDfilename
- the filenameartifact
- the artifact- Returns:
- the revision ID (version) of the saved artifact.
-
loadArtifact
io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(String appName, String userId, String sessionId, String filename, Optional<Integer> version) Gets an artifact.- Parameters:
appName
- the app nameuserId
- the user IDsessionId
- the session IDfilename
- the filenameversion
- Optional version number. If null, loads the latest version.- Returns:
- the artifact or empty if not found
-
listArtifactKeys
io.reactivex.rxjava3.core.Single<ListArtifactsResponse> listArtifactKeys(String appName, String userId, String sessionId) Lists all the artifact filenames within a session.- Parameters:
appName
- the app nameuserId
- the user IDsessionId
- the session ID- Returns:
- the list artifact response containing filenames
-
deleteArtifact
-
listVersions
io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<Integer>> listVersions(String appName, String userId, String sessionId, String filename) Lists all the versions (as revision IDs) of an artifact.- Parameters:
appName
- the app nameuserId
- the user IDsessionId
- the session IDfilename
- the artifact filename- Returns:
- A list of integer version numbers.
-