TypeError using similaritySearchWithScore method from XataVectorSearch with the xata client #6240
Closed
5 tasks done
Labels
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
TypeError: Cannot read properties of undefined (reading 'score')
at C:\Users<user>\Desktop\fwa\ai\node_modules.pnpm@langchain+community@0.2.20_@xata.io+client@0.0.0-next.v64f10283eb9a098c575590d3ea17600e35032_ocbcrk4os3vohexqsbp5nhgrva\node_modules@langchain\community\dist\vectorstores\xata.cjs:106:25
at Array.map ()
at XataVectorSearch.similaritySearchVectorWithScore (C:\Users<user>\Desktop\fwa\ai\node_modules.pnpm@langchain+community@0.2.20_@xata.io+client@0.0.0-next.v64f10283eb9a098c575590d3ea17600e35032_ocbcrk4os3vohexqsbp5nhgrva\node_modules@langchain\community\dist\vectorstores\xata.cjs:98:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at example (c:\Users<user>\Desktop\fwa\ai\src\scholarships\example.ts:69:19)
Description
I'm trying to use Xata to store the embeddings and documents, and then use its similarity search.
I use the similaritySearchWithScore method, from the XataVectorSearch object, but it gets a typeError, stopping execution of the code.
System Info
yarn info v1.22.22
warning package.json: No license field
{
name: 'langchain',
'dist-tags': {
next: '0.2.3-rc.0',
latest: '0.2.11'
},
versions: [
'0.1.20',
'0.1.21',
'0.1.22',
'0.1.23',
'0.1.24',
'0.1.25',
'0.1.26',
'0.1.27',
'0.1.28',
'0.1.29-rc.0',
'0.1.29',
'0.1.30',
'0.1.31',
'0.1.32',
'0.1.33',
'0.1.34',
'0.1.35',
'0.1.36',
'0.1.37',
'0.2.0-rc.0',
'0.2.0-rc.1',
'0.2.0',
'0.2.1',
'0.2.2',
'0.2.3-rc.0',
'0.2.3',
'0.2.4',
'0.2.5',
'0.2.6',
'0.2.7',
'0.2.8',
'0.2.9',
'0.2.10',
'0.2.11'
],
CUT OUT MID HERE BECAUSE ERROR BODY TOO LONG
platform: windows
node v20.11.0
yarn v1.22.22
The text was updated successfully, but these errors were encountered: