ReMe/reme_ai/agent/react/simple_react_op.py
jinli.yl 12f0b7d124 feat(agent): implement mock search tools and tool memory benchmark
- Added LLMMockSearchOp for simulating search operations with configurable complexity- Created SearchToolA, SearchToolB, and SearchToolC with distinct performance profiles- Implemented UseMockSearchOp for intelligent tool selection based on query analysis
- Added test scripts and query datasets for evaluating tool memory effectiveness
- Integrated tool memory service for storing and retrieving tool performance data
- Created documentation for tool memory benchmark testing methodology
- Refactored agent module structure and imports
- Increased summary tool memory recent call count from20 to 30
2025-10-16 23:31:50 +08:00

24 lines
612 B
Python

import asyncio
from flowllm import C
from flowllm.context.flow_context import FlowContext
from flowllm.op.gallery.react_llm_op import ReactLLMOp
@C.register_op()
class SimpleReactOp(ReactLLMOp):
...
async def main():
from reme_ai.config.config_parser import ConfigParser
C.set_service_config(parser=ConfigParser, config_name="config=default").init_by_service_config()
context = FlowContext(query="茅台和五粮现在股价多少?")
op = SimpleReactOp()
await op.async_call(context=context)
print(context.response.answer)
if __name__ == "__main__":
asyncio.run(main())