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

Pass kwargs to get OpenSearch client from_texts #2993

Merged

Conversation

naveentatikonda
Copy link
Contributor

Description

Pass kwargs to get OpenSearch client from from_texts function

Issues Resolved

#2819

# Remove the opensearch_url from kwargs to avoid passing
# the value twice for argument opensearch_url
kwargs.pop("opensearch_url")
client = _get_opensearch_client(opensearch_url, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

what about all the other kwargs below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, didn't get your question?

Copy link
Contributor

Choose a reason for hiding this comment

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

there are a lot of other arguments in "kwargs" that we use below. do we want to pop them as well? or are they relevant for the client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. I have updated the code to pop all those arguments before getting the opensearch client.

Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
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.

thanks!

@hwchase17 hwchase17 merged commit bb619cd into langchain-ai:master Apr 18, 2023
samching pushed a commit to samching/langchain that referenced this pull request May 1, 2023
### Description
Pass kwargs to get OpenSearch client from `from_texts` function

### Issues Resolved
langchain-ai#2819

Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants