25070,provide the databricks tool prompt cache

Signed-off-by: frank <frankzye@qq.com>
This commit is contained in:
frank 2026-04-05 21:39:58 +08:00
parent ff272ee623
commit 5fb64c337d
2 changed files with 5 additions and 4 deletions

View file

@ -231,9 +231,10 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):
type="function",
function=function_params,
)
if tool.get("cache_control"):
databricks_tool["cache_control"] = cast(dict, tool.get("cache_control"))
cache_control = tool.get("cache_control")
if cache_control:
databricks_tool["cache_control"] = cast(dict, cache_control)
return databricks_tool

View file

@ -60,7 +60,7 @@ class DatabricksFunction(TypedDict, total=False):
class DatabricksTool(TypedDict, total=False):
function: DatabricksFunction
type: Literal["function"]
cache_control: Optional[dict]
cache_control: Required[dict]
class DatabricksMessage(TypedDict, total=False):