mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
- 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
21 lines
No EOL
637 B
Python
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) |