Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pannel with modern spelling panel #205

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 78 additions & 78 deletions templates/aistudio_gemini_prompt_chat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@
},
{
"cell_type": "markdown",
"source": [
"## Setup"
],
"metadata": {
"id": "FKwyTRdwB8aW"
}
},
"source": [
"## Setup"
]
},
{
"cell_type": "markdown",
"source": [
"### Install & import\n"
],
"metadata": {
"id": "rlE8UqxrDIez"
}
},
"source": [
"### Install & import\n"
]
},
{
"cell_type": "code",
"source": [
"!pip install google-generativelanguage"
],
"execution_count": null,
"metadata": {
"id": "cZiU4TKzznh9"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"!pip install google-generativelanguage"
]
},
{
"cell_type": "code",
Expand All @@ -80,57 +80,57 @@
},
{
"cell_type": "markdown",
"metadata": {
"id": "qZsRPVv1ITbh"
},
"source": [
"\n",
"\n",
"### Mount Google Drive"
],
"metadata": {
"id": "qZsRPVv1ITbh"
}
]
},
{
"cell_type": "code",
"source": [
"from google.colab import drive\n",
"drive.mount('/gdrive')"
],
"execution_count": null,
"metadata": {
"id": "d9-t_OkGoLIP"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"from google.colab import drive\n",
"drive.mount('/gdrive')"
]
},
{
"cell_type": "markdown",
"source": [
"## Set the API key"
],
"metadata": {
"id": "Fet3lFjdKHEM"
}
},
"source": [
"## Set the API key"
]
},
{
"cell_type": "markdown",
"source": [
"Add your API_KEY to the secrets manager in the left pannel \"🔑\"."
],
"metadata": {
"id": "ZoRWILAtCzBE"
}
},
"source": [
"Add your API_KEY to the secrets manager in the left panel \"🔑\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "LaLCwNlkCyQd"
},
"outputs": [],
"source": [
"from google.colab import userdata\n",
"\n",
"API_KEY=userdata.get('API_KEY')"
],
"metadata": {
"id": "LaLCwNlkCyQd"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
Expand All @@ -146,15 +146,20 @@
},
{
"cell_type": "markdown",
"source": [
"### Parse the arguments"
],
"metadata": {
"id": "weo-o73WDpdm"
}
},
"source": [
"### Parse the arguments"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "uIog-0SyDuIF"
},
"outputs": [],
"source": [
"import json\n",
"\n",
Expand All @@ -170,32 +175,27 @@
"\n",
"\n",
"stream = False"
],
"metadata": {
"id": "uIog-0SyDuIF"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"source": [
"contents"
],
"execution_count": null,
"metadata": {
"id": "wBS8xNhN0x62"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"contents"
]
},
{
"cell_type": "markdown",
"source": [
"### Call the API"
],
"metadata": {
"id": "E7zAD69vE92b"
}
},
"source": [
"### Call the API"
]
},
{
"cell_type": "code",
Expand All @@ -217,54 +217,54 @@
},
{
"cell_type": "code",
"source": [
"display(Markdown(response.text))"
],
"execution_count": null,
"metadata": {
"id": "Lm3RXwYuGtZK"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"display(Markdown(response.text))"
]
},
{
"cell_type": "code",
"source": [
"response.prompt_feedback"
],
"execution_count": null,
"metadata": {
"id": "JbKuUc3NGxYD"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"response.prompt_feedback"
]
},
{
"cell_type": "code",
"source": [
"response.candidates"
],
"execution_count": null,
"metadata": {
"id": "SLAaIq3kgwwJ"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"response.candidates"
]
},
MarkDaoust marked this conversation as resolved.
Show resolved Hide resolved
{
"cell_type": "code",
"source": [],
"execution_count": null,
"metadata": {
"id": "8kS1DntQ2TKM"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": []
}
],
"metadata": {
"colab": {
"provenance": [],
"private_outputs": true,
"collapsed_sections": [
"Tce3stUlHN0L"
]
],
"private_outputs": true,
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
Expand All @@ -273,4 +273,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
Loading