Skip to content

Commit 370477c

Browse files
Giom-Vmarkmcd
andauthored
Internal links as relative one (google-gemini#290)
* * Updating template with relative links and instructions regarding links * Adding a "Next Steps" section in the template * Making all internal links relative. * Use verb form --------- Co-authored-by: Mark McDonald <macd@google.com>
1 parent e123a0f commit 370477c

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

quickstarts/Audio.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"source": [
110110
"### Configure your API key\n",
111111
"\n",
112-
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
112+
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
113113
]
114114
},
115115
{
@@ -134,7 +134,7 @@
134134
"source": [
135135
"## Upload an audio file with the File API\n",
136136
"\n",
137-
"To use an audio file in your prompt, you must first upload it using the [File API](https://github.com/google-gemini/cookbook/blob/main/quickstarts/File_API.ipynb).\n"
137+
"To use an audio file in your prompt, you must first upload it using the [File API](../quickstarts/File_API.ipynb).\n"
138138
]
139139
},
140140
{
@@ -416,7 +416,7 @@
416416
"\n",
417417
"### Continue your discovery of the Gemini API\n",
418418
"\n",
419-
"Have a look at the [Audio](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Audio.ipynb) quickstart to learn about another type of media file, then learn more about [prompting with media files](https://ai.google.dev/tutorials/prompting_with_media) in the docs, including the supported formats and maximum length for audio files. .\n"
419+
"Have a look at the [Audio](../quickstarts/Audio.ipynb) quickstart to learn about another type of media file, then learn more about [prompting with media files](https://ai.google.dev/tutorials/prompting_with_media) in the docs, including the supported formats and maximum length for audio files. .\n"
420420
]
421421
}
422422
],

quickstarts/File_API.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"and view the text examples at the end of this guide.\n",
6969
"\n",
7070
"This guide shows how to use the File API to upload a media file and include it in a `GenerateContent` call to the Gemini API. For more information, see the [code\n",
71-
"samples](https://github.com/google-gemini/cookbook/tree/main/quickstarts/file-api).\n"
71+
"samples](../quickstarts/file-api).\n"
7272
]
7373
},
7474
{
@@ -122,7 +122,7 @@
122122
"source": [
123123
"#### Set up your API key\n",
124124
"\n",
125-
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
125+
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../Authentication.ipynb) for an example."
126126
]
127127
},
128128
{
@@ -160,7 +160,7 @@
160160
"source": [
161161
"First, you will prepare a sample image to upload to the API.\n",
162162
"\n",
163-
"Note: You can also [upload your own files](https://github.com/google-gemini/cookbook/tree/main/examples/Upload_files_to_Colab.ipynb) to use."
163+
"Note: You can also [upload your own files](../examples/Upload_files_to_Colab.ipynb) to use."
164164
]
165165
},
166166
{
@@ -523,7 +523,7 @@
523523
"## Next Steps\n",
524524
"### Useful API references:\n",
525525
"\n",
526-
"For more information about the File API, check its [API reference](https://ai.google.dev/api/files). You will also find more code samples [in this folder](https://github.com/google-gemini/cookbook/tree/main/quickstarts/file-api).\n",
526+
"For more information about the File API, check its [API reference](https://ai.google.dev/api/files). You will also find more code samples [in this folder](../quickstarts/file-api).\n",
527527
"\n",
528528
"### Related examples\n",
529529
"\n",

quickstarts/Video.ipynb

+6-6
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@
110110
"id": "l8g4hTRotheH"
111111
},
112112
"source": [
113-
"#### Setup your API key\n",
113+
"#### Set up your API key\n",
114114
"\n",
115-
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
115+
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
116116
]
117117
},
118118
{
@@ -340,19 +340,19 @@
340340
"\n",
341341
"The File API lets you upload a variety of multimodal MIME types, including images, audio, and video formats. The File API handles inputs that can be used to generate content with [`model.generateContent`](https://ai.google.dev/api/rest/v1/models/generateContent) or [`model.streamGenerateContent`](https://ai.google.dev/api/rest/v1/models/streamGenerateContent).\n",
342342
"\n",
343-
"* Learn more about the [File API](https://github.com/google-gemini/cookbook/blob/main/quickstarts/File_API.ipynb) with the quickstart.\n",
343+
"* Learn more about the [File API](../quickstarts/File_API.ipynb) with the quickstart.\n",
344344
"\n",
345345
"* Learn more about prompting with [media files](https://ai.google.dev/tutorials/prompting_with_media) in the docs, including the supported formats and maximum length.\n",
346346
"\n",
347347
"### Related examples\n",
348348
"\n",
349349
"Check those examples videos with the Gemini API to give you more ideas what you can do with them:\n",
350-
"* Analyze videos to [classify](examples/Analyze_a_Video_Classification.ipynb) or [summarize](https://github.com/google-gemini/cookbook/blob/main/examples/Analyze_a_Video_Summarization.ipynb) them\n",
351-
"* Have the Gemini API recognize an [historical moment](examples/Analyze_a_Video_Historic_Event_Recognition.ipynb) and tell you more about it\n",
350+
"* Analyze videos to [classify](../examples/Analyze_a_Video_Classification.ipynb) or [summarize](../examples/Analyze_a_Video_Summarization.ipynb) them\n",
351+
"* Have the Gemini API recognize an [historical moment](../examples/Analyze_a_Video_Historic_Event_Recognition.ipynb) and tell you more about it\n",
352352
"\n",
353353
"### Continue your discovery of the Gemini API\n",
354354
"\n",
355-
"If you're not already familiar with it, learn how [tokens are counted](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Counting_Tokens.ipynb). Then check how to use the File API to use [Audio files](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Audio.ipynb) with the Gemini API.\n"
355+
"If you're not already familiar with it, learn how [tokens are counted](../quickstarts/Counting_Tokens.ipynb). Then check how to use the File API to use [Audio files](../quickstarts/Audio.ipynb) with the Gemini API.\n"
356356
]
357357
}
358358
],

templates/Template.ipynb

+21-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"source": [
105105
"## Set up your API key\n",
106106
"\n",
107-
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
107+
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](../quickstarts/Authentication.ipynb) quickstart for an example."
108108
]
109109
},
110110
{
@@ -132,6 +132,26 @@
132132
"[Add as many high level sections as needed to step through your guide. Try to introduce new concepts incrementally, and remember that notebooks need to be executable from start to finish using `Runtime -> Run all` in Colab.]"
133133
]
134134
},
135+
{
136+
"cell_type": "markdown",
137+
"metadata": {
138+
"id": "4677dd58e9b5"
139+
},
140+
"source": [
141+
"## Next Steps\n",
142+
"### Useful API references:\n",
143+
"\n",
144+
"[Always end with links to the related doumentation]\n",
145+
"\n",
146+
"### Related examples\n",
147+
"\n",
148+
"[If any, add links to the related examples]\n",
149+
"\n",
150+
"### Continue your discovery of the Gemini API\n",
151+
"\n",
152+
"[Finally, link some other quickstarts that are either related or require the same level of expertise]\n"
153+
]
154+
},
135155
{
136156
"cell_type": "markdown",
137157
"metadata": {

0 commit comments

Comments
 (0)