-
Notifications
You must be signed in to change notification settings - Fork 2.6k
chore: update deprecated models to gemini-1.5/2.5 family to Latest Mo… #1148
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
59956a2
1e78e1e
72ed316
6ece204
9fe8a10
754ed97
bff0557
41cbc05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,8 +71,8 @@ | |
| "name": "stdout", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/137.7 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r", | ||
| "\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m133.1/137.7 kB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r", | ||
| "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/137.7 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\n", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you adding \n in the output? |
||
| "\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m133.1/137.7 kB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\n", | ||
| "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.7/137.7 kB\u001b[0m \u001b[31m2.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | ||
| "\u001b[?25h" | ||
| ] | ||
|
|
@@ -1276,7 +1276,7 @@ | |
| "\n", | ||
| "\n", | ||
| "def create_embeddings(df):\n", | ||
| " MODEL_ID = \"text-embedding-004\" # @param [\"embedding-001\",\"text-embedding-004\"] {allow-input: true}\n", | ||
| " MODEL_ID = \"text-embedding-001\" # @param [\"embedding-001\",\"text-embedding-004\"] {allow-input: true}\n", | ||
kkorpal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| " model = f\"models/{MODEL_ID}\"\n", | ||
| " embed_fn = make_embed_text_fn(model)\n", | ||
| "\n", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,7 +91,7 @@ | |
| "client = genai.Client(api_key=api_key)\n", | ||
| "\n", | ||
| "# Define the model you are going to use\n", | ||
| "model_id = \"gemini-2.5-flash\" # or \"gemini-2.5-flash-lite\", \"gemini-2.5-flash\", \"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"" | ||
| "model_id = \"gemini-3-flash-preview\" # or \"gemini-2.5-flash-lite\", \"gemini-2.5-flash\", \"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"" | ||
|
||
| ] | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,7 +160,7 @@ | |
| " Ensure your essay includes a clear thesis statement. You should write only an essay, so do not include any notes.\n", | ||
| "\"\"\"\n", | ||
| "\n", | ||
| "MODEL_ID=\"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}\n", | ||
| "MODEL_ID=\"gemini-3-flash-preview\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}\n", | ||
|
||
| "\n", | ||
| "student_response = client.models.generate_content(\n", | ||
| " model=MODEL_ID,\n", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,7 +123,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_ID=\"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\",\"gemini-3.1-flash-lite-preview\",\"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}" | ||
| "MODEL_ID=\"gemini-3-flash-preview\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\",\"gemini-3.1-flash-lite-preview\",\"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}" | ||
|
||
| ] | ||
| }, | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.