mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
Add support for delete via only file_id
This commit is contained in:
parent
a92a0fa686
commit
cad15e21cc
1 changed files with 3 additions and 1 deletions
|
|
@ -299,7 +299,9 @@ class GoogleAIStudioFilesHandler(GeminiModelInfo, BaseFilesConfig):
|
|||
# Extract the file path from full URI
|
||||
file_name = file_id.split("/v1beta/")[-1]
|
||||
else:
|
||||
file_name = f"files/{file_id}"
|
||||
if not file_id.startswith("files/"):
|
||||
file_id = f"files/{file_id}"
|
||||
file_name = file_id
|
||||
|
||||
# Construct the delete URL
|
||||
url = f"{api_base}/v1beta/{file_name}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue