mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-06 08:16:00 +00:00
adapt to new base classes
This commit is contained in:
parent
858e6f6e3e
commit
e70ef1fd2d
1 changed files with 3 additions and 2 deletions
|
|
@ -23,7 +23,8 @@ class BaseSummarizer(BaseModel, ABC):
|
|||
def execute(self, trajectories: List[Trajectory], workspace_id: str = None, **kwargs) -> List[Experience]:
|
||||
experiences: List[Experience] = self._extract_experiences(trajectories, workspace_id=workspace_id, **kwargs)
|
||||
|
||||
nodes: List[VectorStoreNode] = [x.to_vector_store_node() for x in experiences]
|
||||
self.vector_store.insert(nodes, index_name=workspace_id, **kwargs)
|
||||
if experiences:
|
||||
nodes: List[VectorStoreNode] = [x.to_vector_store_node() for x in experiences]
|
||||
self.vector_store.insert(nodes, index_name=workspace_id, **kwargs)
|
||||
|
||||
return experiences
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue