Add label truncation functionality to prevent excessively long node labels#24
Add label truncation functionality to prevent excessively long node labels#24marcelsamyn merged 5 commits intomainfrom
Conversation
Co-authored-by: iamarcel <1212234+iamarcel@users.noreply.github.com>
|
@copilot i had another idea now, can you Add it? During the cleanup phase, let's search for nodes that have labels but no embedding and generate those missing embedding. Let's make sure we have a central way of generating the strings to be embedded that we reuse everywhere, it should be somewhere already. |
Co-authored-by: iamarcel <1212234+iamarcel@users.noreply.github.com>
Added the missing embeddings generation functionality! The cleanup now includes a |
|
@copilot Instead of creating a new endpoint, just add it to the cleanup job. |
…ate endpoint Co-authored-by: iamarcel <1212234+iamarcel@users.noreply.github.com>
Integrated the functionality into the cleanup job as requested. Removed the separate |
This PR implements a simple cleanup feature to truncate node labels longer than 255 characters, addressing issues where extremely long labels (like "full assistant dream as label") were causing problems in the system.
Changes Made
Core Functionality
truncateLongLabels(userId)function insrc/lib/jobs/cleanup-graph.tslength(label) > 255 AND label IS NOT NULLAPI Endpoint
/truncate-labelsREST endpoint insrc/routes/truncate-labels.tsuserIdparameter and returns update countExample Usage
Safety Features
Testing
Fixes #23.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.