-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Remove deprecated models and replace them with newer ones #1134
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
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 |
|---|---|---|
|
|
@@ -163,7 +163,7 @@ | |
| "output_type": "stream", | ||
| "text": [ | ||
| "models/embedding-001\n", | ||
| "models/text-embedding-004\n", | ||
| "models/gemini-embedding-001\n", | ||
| "models/gemini-embedding-exp-03-07\n", | ||
| "models/gemini-embedding-exp\n", | ||
| "models/gemini-embedding-001\n" | ||
|
|
@@ -193,7 +193,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\":true, isTemplate: true}" | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\":true, isTemplate: true}" | ||
|
Contributor
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. |
||
| ] | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -313,7 +313,7 @@ | |
| " search_history.add(search_term) # add to search history\n", | ||
| "\n", | ||
| " try:\n", | ||
| " # extract the relevant data by using `gemini-2.0-flash` model\n", | ||
| " # extract the relevant data by using `gemini-2.5-flash` model\n", | ||
| " page = wikipedia.page(search_term, auto_suggest=False)\n", | ||
| " url = page.url\n", | ||
| " print(f\"Information Source: {url}\")\n", | ||
|
|
@@ -1190,7 +1190,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "EMBEDDINGS_MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
| "EMBEDDINGS_MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
|
Contributor
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. |
||
| "\n", | ||
| "def get_embeddings(content: list[str]) -> np.ndarray:\n", | ||
| " embeddings = client.models.embed_content(\n", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,7 +176,7 @@ | |
| " prototype with generative AI applications\n", | ||
| "\"\"\"\n", | ||
| "\n", | ||
| "EMBEDDING_MODEL_ID = MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
| "EMBEDDING_MODEL_ID = MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
|
Contributor
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. |
||
| "embedding = client.models.embed_content(\n", | ||
| " model=EMBEDDING_MODEL_ID,\n", | ||
| " contents=sample_text,\n", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,7 +183,7 @@ | |
| "output_type": "stream", | ||
| "text": [ | ||
| "models/embedding-001\n", | ||
| "models/text-embedding-004\n", | ||
| "models/gemini-embedding-001\n", | ||
| "models/gemini-embedding-exp-03-07\n", | ||
| "models/gemini-embedding-exp\n", | ||
| "models/gemini-embedding-001\n" | ||
|
|
@@ -213,7 +213,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\":true, isTemplate: true}" | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\":true, isTemplate: true}" | ||
|
Contributor
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. |
||
| ] | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -195,7 +195,7 @@ | |
| "output_type": "stream", | ||
| "text": [ | ||
| "models/embedding-001\n", | ||
| "models/text-embedding-004\n", | ||
| "models/gemini-embedding-001\n", | ||
| "models/gemini-embedding-exp-03-07\n", | ||
| "models/gemini-embedding-exp\n", | ||
| "models/gemini-embedding-001\n" | ||
|
|
@@ -312,7 +312,7 @@ | |
| "\n", | ||
| "class GeminiEmbeddingFunction(EmbeddingFunction):\n", | ||
| " def __call__(self, input: Documents) -> Embeddings:\n", | ||
| " EMBEDDING_MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
| " EMBEDDING_MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
|
Contributor
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. |
||
| " title = \"Custom query\"\n", | ||
| " response = client.models.embed_content(\n", | ||
| " model=EMBEDDING_MODEL_ID,\n", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,7 +187,7 @@ | |
| "output_type": "stream", | ||
| "text": [ | ||
| "models/embedding-001\n", | ||
| "models/text-embedding-004\n", | ||
| "models/gemini-embedding-001\n", | ||
| "models/gemini-embedding-exp-03-07\n", | ||
| "models/gemini-embedding-exp\n", | ||
| "models/gemini-embedding-001\n" | ||
|
|
@@ -217,7 +217,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\":true, isTemplate: true}" | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\":true, isTemplate: true}" | ||
|
Contributor
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. |
||
| ] | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,7 +179,7 @@ | |
| "output_type": "stream", | ||
| "text": [ | ||
| "models/embedding-001\n", | ||
| "models/text-embedding-004\n", | ||
| "models/gemini-embedding-001\n", | ||
| "models/gemini-embedding-exp-03-07\n", | ||
| "models/gemini-embedding-exp\n", | ||
| "models/gemini-embedding-001\n" | ||
|
|
@@ -209,7 +209,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\":true, isTemplate: true}" | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\":true, isTemplate: true}" | ||
|
Contributor
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. |
||
| ] | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -661,7 +661,7 @@ | |
| "import time\n", | ||
| "from google.api_core import exceptions, retry\n", | ||
| "\n", | ||
| "MODEL_FOR_EMBEDDING = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"embedding-001\", \"text-embedding-004\"] {\"allow-input\":true, isTemplate: true}\n", | ||
| "MODEL_FOR_EMBEDDING = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"embedding-001\", \"gemini-embedding-001\"] {\"allow-input\":true, isTemplate: true}\n", | ||
|
Contributor
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. |
||
| "\n", | ||
| "BATCH_SIZE = 25\n", | ||
| "QDRANT_BATCH_SIZE = 3072\n", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -319,7 +319,7 @@ | |
| "from google.genai import types\n", | ||
| "\n", | ||
| "# Select embedding model\n", | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"text-embedding-004\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
| "MODEL_ID = \"gemini-embedding-001\" # @param [\"gemini-embedding-001\", \"gemini-embedding-001\"] {\"allow-input\": true, \"isTemplate\": true}\n", | ||
|
Contributor
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. |
||
| "\n", | ||
| "\n", | ||
| "# Function to convert text to embeddings\n", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list of models in the
@paramdecorator contains a duplicate entry for'gemini-2.5-flash-native-audio-preview-12-2025'. Please remove the duplicate to avoid confusion and keep the list of selectable models clean.