MCPcopy Create free account
hub / github.com/DVampire/FinAgent / query_memory

Method query_memory

finagent/memory/interface.py:115–129  ·  view source on GitHub ↗
(
        self,
        type: str,
        symbol: str,
        data: Dict,
        embedding_query: str,
        top_k: int = 3)

Source from the content-addressed store, hash-verified

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,

Callers 1

diverse_queryMethod · 0.80

Calls 2

_get_memoryMethod · 0.95
queryMethod · 0.45

Tested by

no test coverage detected