Skip to content

Commit

Permalink
rm kg cruft (#884)
Browse files Browse the repository at this point in the history
* rm kg cruft

* tweaks
  • Loading branch information
emrgnt-cmplxty authored Aug 19, 2024
1 parent d00b5a9 commit 9c8ff3a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 63 deletions.
28 changes: 1 addition & 27 deletions r2r/main/api/client/restructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,4 @@ async def enrich_graph(
[doc.model_dump() for doc in documents] if documents else None
)
}
return await client._make_request("POST", "kg/enrich_graph", json=data)

@staticmethod
async def query_graph(client, query: str) -> Dict[str, Any]:
"""
Query the knowledge graph.
Args:
query (str): The query to run against the knowledge graph.
Returns:
Dict[str, Any]: Results of the graph query.
"""
params = {"query": query}
return await client._make_request(
"GET", "kg/query_graph", params=params
)

@staticmethod
async def get_graph_statistics(client) -> Dict[str, Any]:
"""
Get statistics about the knowledge graph.
Returns:
Dict[str, Any]: Statistics about the knowledge graph.
"""
return await client._make_request("GET", "kg/graph_statistics")
return await client._make_request("POST", "enrich_graph", json=data)
Empty file removed r2r/main/api/routes/kg/__init__.py
Empty file.
23 changes: 0 additions & 23 deletions r2r/main/api/routes/kg/base.py

This file was deleted.

10 changes: 0 additions & 10 deletions r2r/main/api/routes/kg/requests.py

This file was deleted.

3 changes: 0 additions & 3 deletions r2r/main/api/routes/restructure/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ async def enrich_graph(
"generation_config": generation_config,
}
return await self.engine.enrich_graph(request)


# ... existing code ...

0 comments on commit 9c8ff3a

Please sign in to comment.