-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
core[minor]: Make VectorStore
generic and pass Metadata
type to DocumentInterface
#4590
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Couple questions, thank you for doing this!
langchain-core/src/vectorstores.ts
Outdated
Metadata extends Record<string, any> = Record<string, any> | ||
> extends BaseRetrieverInterface { |
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 think the Metadata
type should be passed to BaseRetrieverInterface
too
Metadata extends Record<string, any> = Record<string, any> | |
> extends BaseRetrieverInterface { | |
Metadata extends Record<string, any> = Record<string, any> | |
> extends BaseRetrieverInterface<Metadata> { |
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 noticed this is also missing here
If you could push up a commit updating that to, that would be great!
langchain-core/src/vectorstores.ts
Outdated
export abstract class VectorStore<Metadata extends Record<string, any> = Record<string, any>> | ||
extends Serializable | ||
implements VectorStoreInterface |
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.
Missing generic getting passed to VectorStoreInterface
here too
VectorStore
generic and pass Metadata
type to DocumentInterface
VectorStore
generic and pass Metadata
type to DocumentInterface
It's having a bad time with the build :( |
@jacoblee93 @bracesproul updated! |
Bump @davidfant, I can make this change too |
@jacoblee93 commented |
Nope you're correct |
Ok yeah now it's having a bad time with the concrete classes:
I can try to untangle later but we might need to find a way to restrict the type (this is from running |
@jacoblee93 I fixed lint and build issues now. Both core and community build
|
Thank you! |
Seems like it's failing
I can have a look tomorrow |
Followup on #4568