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

Fix process for generating embeddings for Notion entries #648

Merged
merged 3 commits into from Feb 20, 2024

Conversation

sabaimran
Copy link
Collaborator

@sabaimran sabaimran commented Feb 19, 2024

We weren't previously generating the embeddings correctly for the Notion entries. Update to resolve the embeddings logic.

Resolves #637

@sabaimran sabaimran added the fix Fix something that isn't working as expected label Feb 19, 2024
Copy link
Member

@debanjum debanjum left a comment

Choose a reason for hiding this comment

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

Left one comment (confused about how this fixes the issue) but otherwise looking forward to having the notion integration fixed!

Comment on lines +115 to +117
current_entries = TextToEntries.split_entries_by_max_tokens(current_entries, max_tokens=256)

return self.update_entries_with_ids(current_entries, user=user)
Copy link
Member

@debanjum debanjum Feb 20, 2024

Choose a reason for hiding this comment

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

Oh, was the issue just that we weren't splitting the entries by max token? Why was that breaking indexing of Notion entries?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, that method also generally handles logic for splitting up the data into chunks and creating the Entry items that make it easy to write to the db.

@sabaimran
Copy link
Collaborator Author

Closes #637

@sabaimran sabaimran merged commit 138f522 into master Feb 20, 2024
9 checks passed
@sabaimran sabaimran deleted the fix/entry-embedding-notion branch February 20, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something that isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] notion import not working
2 participants