mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-09 03:20:54 +00:00
feat(agent): add agent module and update related components
- Add agent module to reme_ai package - Update retrieve module to include agent-related functionality - Modify summary module to use new agent features - Update configuration to support agent operations
This commit is contained in:
parent
423cf2f262
commit
9fb7aa4e78
9 changed files with 13 additions and 12 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from reme_ai import retrieve
|
||||
from reme_ai import summary
|
||||
from reme_ai import agent
|
||||
from reme_ai import vector_store
|
||||
|
||||
__version__ = "0.1.0"
|
||||
|
|
|
|||
0
reme_ai/agent/__init__.py
Normal file
0
reme_ai/agent/__init__.py
Normal file
|
|
@ -62,15 +62,15 @@ flow:
|
|||
description: "current query"
|
||||
required: true
|
||||
|
||||
vector_store:
|
||||
flow_content: vector_store_action_op
|
||||
description: "directly operate the vector store."
|
||||
input_schema:
|
||||
action:
|
||||
type: "str"
|
||||
description: "vector store operations"
|
||||
required: true
|
||||
enum: [ copy, delete, delete_ids, dump, load ]
|
||||
vector_store:
|
||||
flow_content: vector_store_action_op
|
||||
description: "directly operate the vector store."
|
||||
input_schema:
|
||||
action:
|
||||
type: "str"
|
||||
description: "vector store operations"
|
||||
required: true
|
||||
enum: [ copy, delete, delete_ids, dump, load ]
|
||||
|
||||
llm:
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ query_build: |
|
|||
{execution_process}
|
||||
|
||||
Read through the entire execution process to understand which part is currently being executed.
|
||||
Generate a `query` that reflects the current state, which will later be used to search for similar problems in the database and help resolve the issue at hand.
|
||||
Generate a `query` that reflects the current state, which will later be used to search for similar problems in the database and help resolve the issue at hand.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class SimpleSummaryOp(BaseLLMOp):
|
|||
return self.llm.chat(messages=[Message(content=summary_prompt)], callback_fn=parse_content)
|
||||
|
||||
def execute(self):
|
||||
trajectories: list = self.context.get("trajectories", [])
|
||||
trajectories: list = self.context.trajectories
|
||||
trajectories: List[Trajectory] = [Trajectory(**x) if isinstance(x, dict) else x for x in trajectories]
|
||||
|
||||
memory_list: List[BaseMemory] = []
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class SuccessExtractionOp(BaseLLMOp):
|
|||
|
||||
def execute(self):
|
||||
"""Extract task memories from successful trajectories"""
|
||||
success_trajectories: List[Trajectory] = self.context.get("success_trajectories", [])
|
||||
success_trajectories: List[Trajectory] = self.context.success_trajectories
|
||||
|
||||
if not success_trajectories:
|
||||
logger.info("No success trajectories found for extraction")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue