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

Make so explicit class constructor is called in ElasticVectorSearch from_texts #6199

Merged
merged 6 commits into from
Jul 13, 2023

Conversation

cdiddy77
Copy link
Contributor

@cdiddy77 cdiddy77 commented Jun 15, 2023

Fixes #6198

ElasticKnnSearch.from_texts is actually ElasticVectorSearch.from_texts and throws because it calls ElasticKnnSearch constructor with the wrong arguments.

Now ElasticKnnSearch has its own from_texts, which constructs a proper ElasticKnnSearch.

Who can review?

@CodeDevNinja @dev2049

Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

well wouldnt this initizlize the wrong class entirely for knn then?

@cdiddy77
Copy link
Contributor Author

It would. Yeah. It seems like there is not a reasonable way to reuse ElasticVectorSearch.from_texts for ElasticKnnSearch with the implied semantics. Am I wrong?

@hwchase17
Copy link
Contributor

It would. Yeah. It seems like there is not a reasonable way to reuse ElasticVectorSearch.from_texts for ElasticKnnSearch with the implied semantics. Am I wrong?

yeah seems that way. maybe worth splitting up classes even more?

@vercel
Copy link

vercel bot commented Jun 20, 2023

Someone is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@cdiddy77
Copy link
Contributor Author

It would. Yeah. It seems like there is not a reasonable way to reuse ElasticVectorSearch.from_texts for ElasticKnnSearch with the implied semantics. Am I wrong?

yeah seems that way. maybe worth splitting up classes even more?

Done.

@baskaryan baskaryan added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jul 13, 2023
@vercel
Copy link

vercel bot commented Jul 13, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Jul 13, 2023 8:48pm

@baskaryan baskaryan merged commit 574698a into langchain-ai:master Jul 13, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elasticsearch : ElasticKnnSearch.from_texts throws AttributeError
3 participants