feat: add Pyversity integration#2861
Conversation
|
@kacperlukawski thanks for the new integration! A few high level comments I want to provide as feedback:
|
Thanks for having a look @sjrl! I added to_dict and from_dict, and allowed setting |
| return default_from_dict(cls, data) | ||
|
|
||
| @component.output_types(documents=list[Document]) | ||
| def run(self, documents: list[Document]) -> dict: |
There was a problem hiding this comment.
Do you think it would also make sense to expose some of the other params like top_k, strategy or diversity at runtime as well? We often have top_k as a runtime param as well so users can easily test without needing to reinitialize the component or pipeline.
There was a problem hiding this comment.
Yes, makes sense if we do that for other components. Let me extend it.
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
sjrl
left a comment
There was a problem hiding this comment.
Looks good! Up to you if you'd like to expand the run method. We can always do it later if users request it as a feature.
|
@sjrl I decided to add a way to override all these params in runtime and some tests to cover these cases. |
Looks good, feel free to merge! |
Related Issues
Proposed Changes:
Integrate Pyversity for retrieval results diversification.
How did you test it?
Unit tests are included similarly to the other integrations.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.