(
self,
type: str,
symbol: str,
data: Dict,
embedding_query: str,
top_k: int = 3)
| 113 | print(f"Add memory for {type} {symbol}.") |
| 114 | |
| 115 | def query_memory( |
| 116 | self, |
| 117 | type: str, |
| 118 | symbol: str, |
| 119 | data: Dict, |
| 120 | embedding_query: str, |
| 121 | top_k: int = 3)-> Tuple[List[Dict[str, Any]], List[float]]: |
| 122 | memory = self._get_memory(type, symbol) |
| 123 | res = memory.query( |
| 124 | data = data, |
| 125 | embedding_query = embedding_query, |
| 126 | top_k = top_k, |
| 127 | ) |
| 128 | print(f"Query memory for {type} {symbol}.") |
| 129 | return res |
| 130 | |
| 131 | def add_recent_history( |
| 132 | self, |
no test coverage detected