Skip to content

Commit

Permalink
docs: update client.files.upload usage in README (use the correct par…
Browse files Browse the repository at this point in the history
…ameter name)
  • Loading branch information
MrMebelMan committed Feb 13, 2025
1 parent d96bba2 commit 18a2253
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ download the file in console.
python code.

```python
file = client.files.upload(file='a11.txt')
file = client.files.upload(path='a11.txt')
response = client.models.generate_content(
model='gemini-2.0-flash-001',
contents=['Could you summarize this file?', file]
Expand Down Expand Up @@ -782,8 +782,8 @@ Files are only supported in Gemini Developer API.
### Upload

```python
file1 = client.files.upload(file='2312.11805v3.pdf')
file2 = client.files.upload(file='2403.05530.pdf')
file1 = client.files.upload(path='2312.11805v3.pdf')
file2 = client.files.upload(path='2403.05530.pdf')

print(file1)
print(file2)
Expand All @@ -792,14 +792,14 @@ print(file2)
### Get

```python
file1 = client.files.upload(file='2312.11805v3.pdf')
file1 = client.files.upload(path='2312.11805v3.pdf')
file_info = client.files.get(name=file1.name)
```

### Delete

```python
file3 = client.files.upload(file='2312.11805v3.pdf')
file3 = client.files.upload(path='2312.11805v3.pdf')

client.files.delete(name=file3.name)
```
Expand Down Expand Up @@ -1103,4 +1103,5 @@ print(async_pager[0])
delete_job = client.batches.delete(name=job.name)

delete_job
```
```

0 comments on commit 18a2253

Please sign in to comment.