mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-09 20:22:12 +00:00
add native cachedContents endpoint
This commit is contained in:
committed by
Krrish Dholakia
parent
5534499c08
commit
7b0a50d188
@@ -279,12 +279,6 @@ class VertexFineTuningAPI(VertexLLM):
|
||||
elif "countTokens" in request_route:
|
||||
url = f"https://{vertex_location}-aiplatform.googleapis.com/v1/projects/{vertex_project}/locations/{vertex_location}{request_route}"
|
||||
elif "cachedContents" in request_route:
|
||||
_model = request_data.get("model")
|
||||
if _model is not None and "/publishers/google/models/" not in _model:
|
||||
request_data["model"] = (
|
||||
f"projects/{vertex_project}/locations/{vertex_location}/publishers/google/models/{_model}"
|
||||
)
|
||||
|
||||
url = f"https://{vertex_location}-aiplatform.googleapis.com/v1beta1/projects/{vertex_project}/locations/{vertex_location}{request_route}"
|
||||
else:
|
||||
raise ValueError(f"Unsupported Vertex AI request route: {request_route}")
|
||||
|
||||
Reference in New Issue
Block a user