diff --git a/quickstarts/Get_started.ipynb b/quickstarts/Get_started.ipynb index 59f814168..a63c03738 100644 --- a/quickstarts/Get_started.ipynb +++ b/quickstarts/Get_started.ipynb @@ -112,7 +112,7 @@ } ], "source": [ - "!pip install -U -q google-genai" + "!pip install -U -q 'google-genai==0.8.0'" ] }, { @@ -1104,7 +1104,7 @@ ], "source": [ "# Upload the file using the API\n", - "file_upload = client.files.upload(path=img_path)\n", + "file_upload = client.files.upload(file=img_path)\n", "\n", "response = client.models.generate_content(\n", " model=MODEL_ID,\n", @@ -1487,7 +1487,7 @@ ], "source": [ "# Upload the file using the API\n", - "file_upload = client.files.upload(path=text_path)\n", + "file_upload = client.files.upload(file=text_path)\n", "\n", "response = client.models.generate_content(\n", " model=MODEL_ID,\n", @@ -1588,7 +1588,7 @@ ], "source": [ "# Upload the file using the API\n", - "file_upload = client.files.upload(path=pdf_path)\n", + "file_upload = client.files.upload(file=pdf_path)\n", "\n", "response = client.models.generate_content(\n", " model=MODEL_ID,\n", @@ -1678,7 +1678,7 @@ ], "source": [ "# Upload the file using the API\n", - "file_upload = client.files.upload(path=audio_path)\n", + "file_upload = client.files.upload(file=audio_path)\n", "\n", "response = client.models.generate_content(\n", " model=MODEL_ID,\n", @@ -1765,7 +1765,7 @@ } ], "source": [ - "video_file = client.files.upload(path=video_file_name)\n", + "video_file = client.files.upload(file=video_file_name)\n", "print(f\"Completed upload: {video_file.uri}\")" ] }, @@ -1964,7 +1964,7 @@ " file_bytes = requests.get(url).content\n", " name = pathlib.Path(url).name\n", " pathlib.Path(name).write_bytes(file_bytes)\n", - " uploads.append(client.files.upload(path=name, config=dict(mime_type=mime_type)))" + " uploads.append(client.files.upload(file=name, config=dict(mime_type=mime_type)))" ] }, { diff --git a/quickstarts/Video_understanding.ipynb b/quickstarts/Video_understanding.ipynb index 5c4dd4685..3b60b4951 100644 --- a/quickstarts/Video_understanding.ipynb +++ b/quickstarts/Video_understanding.ipynb @@ -145,7 +145,7 @@ } ], "source": [ - "!pip install -U -q google-genai" + "!pip install -U -q 'google-genai==0.8.0'" ] }, { @@ -318,7 +318,7 @@ "import time\n", "\n", "def upload_video(video_file_name):\n", - " video_file = client.files.upload(path=video_file_name)\n", + " video_file = client.files.upload(file=video_file_name)\n", "\n", " while video_file.state == \"PROCESSING\":\n", " print('Waiting for video to be processed.')\n",