Spaces:
Sleeping
Sleeping
| from app.services.retrieval_service import ( | |
| RetrievalService, | |
| ) | |
| service = RetrievalService() | |
| context = service.search( | |
| "graph creation", | |
| ) | |
| print() | |
| print("========== NODES ==========") | |
| for node in context.nodes: | |
| print(node.labels) | |
| print(node.qualified_name) | |
| print(node.properties) | |
| print("-" * 50) | |
| print() | |
| print("========== EDGES ==========") | |
| for edge in context.edges: | |
| print( | |
| edge.source, | |
| "--", | |
| edge.type, | |
| "-->", | |
| edge.target, | |
| ) | |
| print(len(context.nodes)) | |
| print(len(context.edges)) |