From 562fefb374f13382653f594ab3620ea1d037951a Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 18 Jul 2024 12:23:49 -0700 Subject: [PATCH] Use 3-small in docs instead of ada-002 Spotted while working on #537 --- docs/embeddings/python-api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/embeddings/python-api.md b/docs/embeddings/python-api.md index 4d635d4..ca58699 100644 --- a/docs/embeddings/python-api.md +++ b/docs/embeddings/python-api.md @@ -5,7 +5,7 @@ You can load an embedding model using its model ID or alias like this: ```python import llm -embedding_model = llm.get_embedding_model("ada-002") +embedding_model = llm.get_embedding_model("3-small") ``` To embed a string, returning a Python list of floating point numbers, use the `.embed()` method: ```python @@ -45,14 +45,14 @@ import llm # This collection will use an in-memory database that will be # discarded when the Python process exits -collection = llm.Collection("entries", model_id="ada-002") +collection = llm.Collection("entries", model_id="3-small") # Or you can persist the database to disk like this: db = sqlite_utils.Database("my-embeddings.db") -collection = llm.Collection("entries", db, model_id="ada-002") +collection = llm.Collection("entries", db, model_id="3-small") # You can pass a model directly using model= instead of model_id= -embedding_model = llm.get_embedding_model("ada-002") +embedding_model = llm.get_embedding_model("3-small") collection = llm.Collection("entries", db, model=embedding_model) ``` If the collection already exists in the database you can omit the `model` or `model_id` argument - the model ID will be read from the `collections` table.