|
1 | 1 | """This module implements a Graph-based Retrieval-Augmented Generation (GraphRAG) system.""" |
2 | 2 |
|
3 | 3 | from dataclasses import dataclass, field |
4 | | -from typing import Any, Dict, Generic, List, Optional, Union |
| 4 | +from typing import Any, Dict, Generic, List, Optional, Tuple, Union |
5 | 5 |
|
6 | 6 | from fast_graphrag._llm import BaseLLMService, format_and_send_prompt |
7 | 7 | from fast_graphrag._llm._base import BaseEmbeddingService |
@@ -75,15 +75,15 @@ def insert( |
75 | 75 | content: Union[str, List[str]], |
76 | 76 | metadata: Union[List[Optional[Dict[str, Any]]], Optional[Dict[str, Any]]] = None, |
77 | 77 | params: Optional[InsertParam] = None, |
78 | | - ) -> None: |
| 78 | + ) -> Tuple[int, int, int]: |
79 | 79 | return get_event_loop().run_until_complete(self.async_insert(content, metadata, params)) |
80 | 80 |
|
81 | 81 | async def async_insert( |
82 | 82 | self, |
83 | 83 | content: Union[str, List[str]], |
84 | 84 | metadata: Union[List[Optional[Dict[str, Any]]], Optional[Dict[str, Any]]] = None, |
85 | 85 | params: Optional[InsertParam] = None, |
86 | | - ) -> None: |
| 86 | + ) -> Tuple[int, int, int]: |
87 | 87 | """Insert a new memory or memories into the graph. |
88 | 88 |
|
89 | 89 | Args: |
|
0 commit comments