Interface BaseArtifactService
- All Known Implementing Classes:
GcsArtifactService, InMemoryArtifactService
public interface BaseArtifactService
用于管理“工件”(artifacts)的服务的基础接口。
-
方法概述
Modifier and TypeMethodDescriptiondefault io.reactivex.rxjava3.core.CompletabledeleteArtifact(SessionKey sessionKey, String filename) io.reactivex.rxjava3.core.CompletabledeleteArtifact(String appName, String userId, String sessionId, String filename) 删除一个工件(artifact)。default io.reactivex.rxjava3.core.Single<ListArtifactsResponse> listArtifactKeys(SessionKey sessionKey) io.reactivex.rxjava3.core.Single<ListArtifactsResponse> listArtifactKeys(String appName, String userId, String sessionId) 列出会话中所有的工件文件名。default io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<Integer>> listVersions(SessionKey sessionKey, String filename) io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<Integer>> listVersions(String appName, String userId, String sessionId, String filename) 列出某个软件组件的所有版本(以修订版本号的形式表示)。default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(SessionKey sessionKey, String filename) 从服务中加载该“工件”(artifact)的最新版本。default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(SessionKey sessionKey, String filename, int version) default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(String appName, String userId, String sessionId, String filename) 从服务中加载该“工件”(artifact)的最新版本。default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(String appName, String userId, String sessionId, String filename, int version) 从服务中加载某个特定版本的工件(artifact)。io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(String appName, String userId, String sessionId, String filename, @Nullable Integer version) default io.reactivex.rxjava3.core.Single<com.google.genai.types.Part> saveAndReloadArtifact(SessionKey sessionKey, String filename, com.google.genai.types.Part artifact) 保存一个“artefact”(即某种数据或对象),并在文件数据(fileData)可用时将其一并返回。default io.reactivex.rxjava3.core.Single<com.google.genai.types.Part> saveAndReloadArtifact(String appName, String userId, String sessionId, String filename, com.google.genai.types.Part artifact) 保存一个“artefact”(即某种数据或对象),并在文件数据(fileData)可用时将其一并返回。default io.reactivex.rxjava3.core.Single<Integer> saveArtifact(SessionKey sessionKey, String filename, com.google.genai.types.Part artifact) 用于保存某个“文物”(即某个具有特殊价值或历史意义的物品)。io.reactivex.rxjava3.core.Single<Integer> saveArtifact(String appName, String userId, String sessionId, String filename, com.google.genai.types.Part 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) 用于保存某个“文物”(即某个具有特殊价值或历史意义的物品)。- Parameters:
appName- the app nameuserId- the user IDsessionId- the session IDfilename- the filenameartifact- the artifact- Returns:
- the revision ID (version) of the saved artifact.
-
saveArtifact
default io.reactivex.rxjava3.core.Single<Integer> saveArtifact(SessionKey sessionKey, String filename, com.google.genai.types.Part artifact) 用于保存某个“文物”(即某个具有特殊价值或历史意义的物品)。 -
saveAndReloadArtifact
default io.reactivex.rxjava3.core.Single<com.google.genai.types.Part> saveAndReloadArtifact(String appName, String userId, String sessionId, String filename, com.google.genai.types.Part artifact) 保存一个“artefact”(即某种数据或对象),并在文件数据(fileData)可用时将其一并返回。为了提高效率,实现类应该覆盖这个默认方法;因为默认方法会执行两次 I/O 操作(先保存数据,再读取数据)。
- Parameters:
appName- the app nameuserId- the user IDsessionId- the session IDfilename- the filenameartifact- the artifact to save- Returns:
- the saved artifact with fileData if available.
-
saveAndReloadArtifact
default io.reactivex.rxjava3.core.Single<com.google.genai.types.Part> saveAndReloadArtifact(SessionKey sessionKey, String filename, com.google.genai.types.Part artifact) 保存一个“artefact”(即某种数据或对象),并在文件数据(fileData)可用时将其一并返回。 -
loadArtifact
-
loadArtifact
default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(SessionKey sessionKey, String filename) 从服务中加载该“工件”(artifact)的最新版本。 -
loadArtifact
-
loadArtifact
default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Part> loadArtifact(SessionKey sessionKey, String filename, int version) -
loadArtifact
-
listArtifactKeys
io.reactivex.rxjava3.core.Single<ListArtifactsResponse> listArtifactKeys(String appName, String userId, String sessionId) 列出会话中所有的工件文件名。- Parameters:
appName- the app nameuserId- the user IDsessionId- the session ID- Returns:
- the list artifact response containing filenames
-
listArtifactKeys
default io.reactivex.rxjava3.core.Single<ListArtifactsResponse> listArtifactKeys(SessionKey sessionKey) -
deleteArtifact
-
deleteArtifact
default io.reactivex.rxjava3.core.Completable deleteArtifact(SessionKey sessionKey, String filename) -
listVersions
io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<Integer>> listVersions(String appName, String userId, String sessionId, String filename) 列出某个软件组件的所有版本(以修订版本号的形式表示)。- Parameters:
appName- the app nameuserId- the user IDsessionId- the session IDfilename- the artifact filename- Returns:
- A list of integer version numbers.
-
listVersions
default io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<Integer>> listVersions(SessionKey sessionKey, String filename)
-