-
Notifications
You must be signed in to change notification settings - Fork 29
Standardize ElasticsearchRetriever #94
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
Conversation
| # Apply user agent | ||
| es_connection = with_user_agent_header(es_connection, "langchain-py-r") | ||
|
|
||
| # Pass ALL Pydantic fields to super().__init__() so Pydantic sets them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a reference to Pydantic here? I don't understand the significance of it. The parent class is a langchain class I think. I wasn't even aware there is Pydantic somewhere in the mix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inheritance chain is something like below. I think the class level annotations with pydantic are used for runtime validation for this class
AsyncElasticsearchRetriever
- BaseRetriever (LangChain)
- RunnableSerializable (LangChain)
- Serializable (LangChain)
- BaseModel (Pydantic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just going to remove the comment incase it is confusing
Part 2 of #93
Part of #78