feat: add cache_salt dimension to LLM response cache

This commit is contained in:
2026-07-16 05:23:58 -04:00
parent c5c11ea81b
commit 564c92a043
6 changed files with 57 additions and 14 deletions
+3
View File
@@ -36,6 +36,7 @@ class GovernedVLMClient:
*,
session_id: str | None = None,
parent_call_id: str | None = None,
cache_salt: str | None = None,
) -> LLMResponse:
"""图文调用:将图片编码为 base64 嵌入 messages,委托给 LLM 客户端。
@@ -45,6 +46,7 @@ class GovernedVLMClient:
images: 图片文件路径列表。
session_id: 会话 ID(遥测用)。
parent_call_id: 父调用 ID(遥测用)。
cache_salt: 可选缓存盐,透传到底层 LLM 缓存键。
返回:
LLMResponse。
@@ -54,6 +56,7 @@ class GovernedVLMClient:
vision_messages,
session_id=session_id,
parent_call_id=parent_call_id,
cache_salt=cache_salt,
)
@staticmethod