mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-06 14:22:46 +02:00
update werewolf experience and add rag retrieve
This commit is contained in:
parent
5caaea2aeb
commit
a466bc9243
3 changed files with 44 additions and 29 deletions
|
|
@ -161,6 +161,13 @@ class SimpleEngine(RetrieverQueryEngine):
|
|||
"""Inplement tools.SearchInterface"""
|
||||
return await self.aquery(content)
|
||||
|
||||
def retrieve(self, query: QueryType) -> list[NodeWithScore]:
|
||||
query_bundle = QueryBundle(query) if isinstance(query, str) else query
|
||||
|
||||
nodes = super().retrieve(query_bundle)
|
||||
self._try_reconstruct_obj(nodes)
|
||||
return nodes
|
||||
|
||||
async def aretrieve(self, query: QueryType) -> list[NodeWithScore]:
|
||||
"""Allow query to be str."""
|
||||
query_bundle = QueryBundle(query) if isinstance(query, str) else query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue