From 55724948010502a2dca2b5f74a9e3e10082dc13e Mon Sep 17 00:00:00 2001 From: David Manouchehri Date: Mon, 1 Jul 2024 15:13:59 +0000 Subject: [PATCH] feat(vertex_httpx.py): Support cachedContent. --- litellm/llms/vertex_httpx.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litellm/llms/vertex_httpx.py b/litellm/llms/vertex_httpx.py index 9e361d3cc..2ea0e199e 100644 --- a/litellm/llms/vertex_httpx.py +++ b/litellm/llms/vertex_httpx.py @@ -1035,6 +1035,9 @@ class VertexLLM(BaseLLM): safety_settings: Optional[List[SafetSettingsConfig]] = optional_params.pop( "safety_settings", None ) # type: ignore + cached_content: Optional[str] = optional_params.pop( + "cached_content", None + ) generation_config: Optional[GenerationConfig] = GenerationConfig( **optional_params ) @@ -1050,6 +1053,8 @@ class VertexLLM(BaseLLM): data["safetySettings"] = safety_settings if generation_config is not None: data["generationConfig"] = generation_config + if cached_content is not None: + data["cachedContent"] = cached_content headers = { "Content-Type": "application/json",