Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[patch]: fix TypeError using the client created with xata init #6241

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

kappita
Copy link
Contributor

@kappita kappita commented Jul 27, 2024

  • fix: TypeError when using VectorSearchWithScore

The xata client created with the xata init command probably has changed its response, creating a TypeError, as the property xata does not exist in the response created by the client. This stops the code execution, as it is trying to access object.xata.score.
Currently, the expected score is found in the object.xata_score property.

In order to prevent breaking changes, the old way is preserved, but it checks if the property exists first. If it does not exist, it access the "current" property

Fixes #6240

Copy link

vercel bot commented Jul 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2024 10:52pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jul 27, 2024 10:52pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Jul 27, 2024
Copy link
Collaborator

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing up a fix for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PRs that are ready to be merged as-is size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError using similaritySearchWithScore method from XataVectorSearch with the xata client
2 participants