-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When trying to store text embeddings using OpenAI's text-embedding-3-large into CrateDB, LangChain trips.
OpenAIEmbeddings(model="text-embedding-3-large")sqlalchemy.exc.ProgrammingError: (crate.client.exceptions.ProgrammingError)
SQLParseException[Field [6] vector's dimensions must be <= [2048]; got 3072]
[SQL: INSERT INTO langchain_embedding (id, collection_id, embedding, document, cmetadata) VALUES (?, ?, ?, ?, ?) ON CONFLICT (id) DO UPDATE SET embedding = excluded.embedding, document = excluded.document, cmetadata = excluded.cmetadata]Details
Processing the SQL DDL statement using FLOAT_VECTOR(3072) succeeds.
CREATE TABLE langchain_embedding (
id STRING NOT NULL,
collection_id STRING,
embedding FLOAT_VECTOR(3072),
document STRING,
cmetadata OBJECT,
PRIMARY KEY (id)
)The error happens when processing the INSERT statement.
INSERT INTO langchain_embedding (id, collection_id, embedding, document, cmetadata)
VALUES (?, ?, ?, ?, ?) ON CONFLICT (id) DO
UPDATE
SET embedding = excluded.embedding,
document = excluded.document,
cmetadata = excluded.cmetadataReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels