Morgan
Morgan
XXata
Created by Morgan on 7/13/2024 in #help
Type mismatch: expected vector..
Hey guys, so I have a table with a vector column with dimensions of 1536. Its naturally used to store embeddings generated via openai. Im able to save embeddings to this column via the Xata client. However.. when using the .ask method of the sdk.. im getting the following error: vector search: column [embedding]: type mismatch: expected vector (An array of floats with fixed dimension) code for reference:
const resp = await xata.db.Summary.ask(question, {
rules: ["..."],
sessionId,
searchType: "vector",
vectorSearch: {
column: "embedding",
contentColumn: "summary",
filter: {
user_id: userId,
},
},
});
const resp = await xata.db.Summary.ask(question, {
rules: ["..."],
sessionId,
searchType: "vector",
vectorSearch: {
column: "embedding",
contentColumn: "summary",
filter: {
user_id: userId,
},
},
});
Snapshot of table: https://imgur.com/eN5dU9i Hopefully someone can help out!
6 replies