ReMe/reme_ai/react/simple_react_op.py
jinli.yl adce394cd0 feat(react): add simple react operator and update related functionalities
- Add SimpleReactOp to react module
- Update reme_ai/__init__.py to include react module
- Modify contra_repeat_op.py to use memory_id instead of id
- Adjust datetime_handler.py to handle string datetime conversion
- Update default.yaml to include react flow content
- Modify get_observation_op.py and get_observation_with_time_op.py to use workspace_id from context
- Update test/http_client_test.py to test new react functionality
- Adjust messages.jsonl to reflect new analysis approach for Xiaomi Corporation
2025-08-29 11:56:50 +08:00

21 lines
No EOL
637 B
Python

from flowllm import C
from flowllm.context.flow_context import FlowContext
from flowllm.op.agent.react_op import ReactOp
@C.register_op()
class SimpleReactOp(ReactOp):
...
if __name__ == "__main__":
from reme_ai.config.config_parser import ConfigParser
C.set_default_service_config(parser=ConfigParser).init_by_service_config()
context = FlowContext(query="茅台和五粮现在股价多少?")
op = SimpleReactOp()
op(context=context)
# from reme_ai.schema import Message
# result = op.llm.chat(messages=[Message(**{"role": "user", "content": "你叫什么名字?"})])
# print("!!!", result)