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

added data-format restructuring #92

Merged
merged 6 commits into from
Jul 7, 2023

Conversation

aaishikdutta
Copy link
Contributor

With the addition of multiple loaders and chunkers the embedchain.py size seems to be growing and I feel it would add to the code-redability by adding some sort of abstraction to the application.

Copy link
Member

@taranjeet taranjeet left a comment

Choose a reason for hiding this comment

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

PR looks good to me and makes much more sense.
The only comment that I have is regarding the name.
whether it should be "data_format" or "data_formatter"

@cachho what do you think?

self.loader = self._get_loader(data_type)
self.chunker = self._get_chunker(data_type)

def _get_loader(self, data_type):
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty sure you can make this a static method

Copy link
Contributor

Choose a reason for hiding this comment

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

@cachho
Copy link
Contributor

cachho commented Jul 7, 2023

we don't have to do my proposed changes in this PR. Looks good to me. About the name, classes should be in PascalCase. DataFormatter makes sense since it's Chunker and Loader as well.

@taranjeet taranjeet merged commit ae1e218 into mem0ai:main Jul 7, 2023
@aaishikdutta aaishikdutta deleted the tech-debt/data-format branch July 7, 2023 18:43
@taranjeet taranjeet mentioned this pull request Jul 8, 2023
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.

None yet

3 participants