Fixes #2349 custom code rag instructions

This commit is contained in:
Steve Rhoades 2024-09-22 17:34:17 -07:00 • committed by Test
parent 88070c977a
commit aa4d1745fa

View file

@ -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([