Skip to content

Commit 81eda54

Browse files
committed
Add Important note in the top
1 parent 9df1d55 commit 81eda54

File tree

1 file changed

+24
-35
lines changed

1 file changed

+24
-35
lines changed

README.md

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,23 @@
55
![PyPI - Downloads](https://img.shields.io/pypi/dd/google-generativeai)
66

77
> [!IMPORTANT]
8-
> This SDK has been deprecated in favor of the new SDK `google-genai` ([github](https://github.com/googleapis/python-genai),
9-
[pypi](https://pypi.org/project/google-genai/)). From Gemini 2.0 onwards the old SDK, `google-generativeai`, will no longer be
10-
developing new features. The old SDK can run a subset of Gemini-2.0 model
11-
features. Any new code should be written using the new SDK, `google-genai`.
8+
> From Gemini 2.0 onwards this SDK will no longer be
9+
developing new features. Any new code should be written using the new SDK, `google-genai` ([github](https://github.com/googleapis/python-genai),
10+
[pypi](https://pypi.org/project/google-genai/)). See the migration guide below to upgrade to the new SDK.
1211

13-
Use the new SDK, [google-genai]((https://github.com/googleapis/python-genai)), for any new code from Gemini 2.0 onwards:
12+
The Google AI Python SDK is an easy way for Python developers to build with the Gemini API. The Gemini API gives you access to Gemini [models](https://ai.google.dev/models/gemini) created by [Google DeepMind](https://deepmind.google/technologies/gemini/#introduction). Gemini models are built from the ground up to be multimodal, so you can reason seamlessly across text, images, and code.
1413

15-
<table align="left">
16-
<td>
17-
<a target="_blank" href="https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started.ipynb">
18-
<img src="https://ai.google.dev/site-assets/images/docs/colab_logo_32px.png" />
19-
Try the new SDK in Google Colab
20-
</a>
21-
</td>
22-
</table>
23-
<br><br>
14+
## Get started with the Gemini API
15+
1. Go to [Google AI Studio](https://aistudio.google.com/).
16+
2. Login with your Google account.
17+
3. [Create](https://aistudio.google.com/app/apikey) an API key.
18+
4. Try a Python SDK [quickstart](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Prompting.ipynb) in the [Gemini API Cookbook](https://github.com/google-gemini/gemini-api-cookbook/).
19+
5. For detailed instructions, try the
20+
[Python SDK tutorial](https://ai.google.dev/tutorials/python_quickstart) on [ai.google.dev](https://ai.google.dev).
2421

2522
## Upgrade to the new Google Gen AI SDK for Python
2623

27-
Follow the migration guide below to upgrade your code to the new SDK.
28-
29-
<details>
30-
<summary>Migration guide</summary>
31-
32-
Until now, the `google-generativeai` SDK package has been the recommended tool
24+
Until now, the `google-generativeai` SDK package has been the recommended tool
3325
for accessing the Gemini API from Python. While this package gets the job done,
3426
the long incremental development process (starting from the PaLM API in 2023)
3527
made it impossible to implement some important high level features without
@@ -47,9 +39,19 @@ resolve these problems. Among other things, the new package:
4739
* Follows the API layout closely; paths and data structures mostly match
4840
between the SDK and the REST interface.
4941

50-
Any new code should be written using the new SDK, `google-genai`.
42+
From Gemini 2.0 onwards the old SDK, `google-generativeai`, will no longer be
43+
developing new features. The old SDK can run a subset of Gemini-2.0 model
44+
features. Any new new code should be written using the new SDK, `google-genai`.
5145

52-
To upgrade your code to use the new SDK, follow these steps:
46+
<table align="left">
47+
<td>
48+
<a target="_blank" href="https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started.ipynb">
49+
<img src="https://ai.google.dev/site-assets/images/docs/colab_logo_32px.png" />
50+
Try the new SDK in Google Colab
51+
</a>
52+
</td>
53+
</table>
54+
<br><br>
5355

5456
### Install the SDK
5557

@@ -950,16 +952,3 @@ response = client.models.generate_content(
950952
contents='55',
951953
)
952954
```
953-
954-
</details>
955-
956-
## Get started with the Gemini API
957-
958-
If you still want to build with this old SDK, follow these steps:
959-
960-
1. Go to [Google AI Studio](https://aistudio.google.com/).
961-
2. Login with your Google account.
962-
3. [Create](https://aistudio.google.com/app/apikey) an API key.
963-
4. Try a Python SDK [quickstart](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Prompting.ipynb) in the [Gemini API Cookbook](https://github.com/google-gemini/gemini-api-cookbook/).
964-
5. For detailed instructions, try the
965-
[Python SDK tutorial](https://ai.google.dev/tutorials/python_quickstart) on [ai.google.dev](https://ai.google.dev).

0 commit comments

Comments
 (0)