feat(graph): add ergonomic UpdateEntitiesTool for renaming and type changes

This commit is contained in:
Riz Ashraf committed 2026-10-10 12:27:29 +01:00
1 parent cfcd42f41e
commit eed9a9165c
3 files changed
+120

No files matched your search

+17
View File
@@ -18,6 +18,23 @@ pub struct CreateEntitiesTool {
pub entities: Vec<EntityInput>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct UpdateEntityInput {
/// The current name of the entity to update.
pub name: String,
/// Optional new name to rename the entity to.
pub new_name: Option<String>,
/// Optional new entity type (e.g. PascalCase).
pub new_entity_type: Option<String>,
}
/// Update existing entities in the knowledge graph (e.g., to rename an entity or change its type).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct UpdateEntitiesTool {
/// Array of entity updates to perform.
pub updates: Vec<UpdateEntityInput>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct RelationInput {
pub from: String,