-
Notifications
You must be signed in to change notification settings - Fork 0
Temporal Animation + Renaming Entities/Other Features #1108
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
base: dev
Are you sure you want to change the base?
Conversation
ClaireBookworm
commented
Jan 25, 2026
- added support for renaming entities, enabling a video example for showing graph
- showing graph_viz_server, to show a way to see the graphed relationships between entiites
Greptile OverviewGreptile SummaryThis PR adds entity renaming capabilities and visualization tools to the temporal memory system. The main additions include:
The implementation correctly uses parameterized SQL queries to prevent injection attacks in Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant TemporalMemory
participant VLM
participant EntityGraphDB
participant FlaskViz
Note over TemporalMemory,EntityGraphDB: Entity Renaming Flow
User->>TemporalMemory: query("rename person in brown jacket to john")
TemporalMemory->>TemporalMemory: Build prompt with rename instructions
TemporalMemory->>VLM: query(frame, prompt)
VLM-->>TemporalMemory: Response with RENAME_ENTITY command
TemporalMemory->>TemporalMemory: Extract rename via regex pattern
TemporalMemory->>TemporalMemory: rename_entity(entity_id="E8", new_name="john")
TemporalMemory->>EntityGraphDB: get_entity(entity_id)
EntityGraphDB-->>TemporalMemory: entity data
TemporalMemory->>TemporalMemory: Build new descriptor: "john (person wearing brown jacket)"
TemporalMemory->>EntityGraphDB: update_entity(entity_id, descriptor, metadata)
EntityGraphDB->>EntityGraphDB: Merge metadata with existing
EntityGraphDB->>EntityGraphDB: Execute SQL UPDATE with params
EntityGraphDB-->>TemporalMemory: Success
TemporalMemory->>TemporalMemory: Update entity roster in state
TemporalMemory->>TemporalMemory: Remove RENAME_ENTITY from response
TemporalMemory-->>User: Cleaned response text
Note over FlaskViz,EntityGraphDB: Visualization Flow
FlaskViz->>FlaskViz: Poll /api/graph every 1s
FlaskViz->>EntityGraphDB: get_all_entities()
EntityGraphDB-->>FlaskViz: entities list
FlaskViz->>EntityGraphDB: get_recent_relations()
EntityGraphDB-->>FlaskViz: relations list
FlaskViz->>EntityGraphDB: get_distance(e1, e2) for all pairs
EntityGraphDB-->>FlaskViz: distance data
FlaskViz->>FlaskViz: Render graph with vis.js
FlaskViz-->>User: Display updated entity names
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 3 comments
| answer_text = answer_text.strip() | ||
|
|
||
| # Check for rename commands in the response | ||
| import re |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re module imported inside method instead of at module level - move to top imports for better performance
| print("🌐 Open http://localhost:8080 in your browser") | ||
| print("Press Ctrl+C to stop") | ||
|
|
||
| app.run(host="0.0.0.0", port=8080, debug=False, threaded=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flask server binds to 0.0.0.0 making it accessible from any network interface - this could expose the temporal memory database to unauthorized access. Consider binding to 127.0.0.1 for localhost-only access unless external access is specifically required.
dimos/perception/experimental/temporal_memory/video_temporal_example.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments