From aa4d1745fa02bc6fd9e169eeef3923a9fac5f70a Mon Sep 17 00:00:00 2001 From: Steve Rhoades Date: Sun, 22 Sep 2024 17:34:17 -0700 Subject: [PATCH] Fixes #2349 custom code rag instructions --- docs/docs/customize/tutorials/custom-code-rag.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/customize/tutorials/custom-code-rag.md b/docs/docs/customize/tutorials/custom-code-rag.md index 1ab4aecbb..ed184565a 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.md +++ b/docs/docs/customize/tutorials/custom-code-rag.md @@ -37,6 +37,7 @@ With LanceDB, we can do steps 2 and 3 simultaneously, as demonstrated [in their ```python from lancedb.pydantic import LanceModel, Vector from lancedb.embeddings import get_registry +from typing import List db = lancedb.connect("/tmp/db") func = get_registry().get("openai").create( @@ -48,7 +49,7 @@ func = get_registry().get("openai").create( class CodeChunks(LanceModel): filename: str text: str = func.SourceField() - vector: Vector(func.ndims()) = func.VectorField() + vector: List[float] = func.VectorField() table = db.create_table("code_chunks", schema=CodeChunks, mode="overwrite") table.add([