We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a3a005a + 7b2c5ef commit a21a8c0Copy full SHA for a21a8c0
google/generativeai/files.py
@@ -74,11 +74,10 @@ def upload_file(
74
mime_type, _ = mimetypes.guess_type(path)
75
76
if mime_type is None:
77
- if mime_type is None:
78
- raise ValueError(
79
- "Unknown mime type: Could not determine the mimetype for your file\n"
80
- " please set the `mime_type` argument"
81
- )
+ raise ValueError(
+ "Unknown mime type: Could not determine the mimetype for your file\n"
+ " please set the `mime_type` argument"
+ )
82
83
if name is not None and "/" not in name:
84
name = f"files/{name}"
0 commit comments