ReMe/test/test5.py
jinli.yl b9da8d2a7f feat(memory): add tool call result handling and memory management
- Add new ToolCallResult and ToolMemory schemas for tracking tool executions
- Implement tool memory retrieval and summarization flows in default config
- Register new parse_tool_call_result_op for processing tool call results
- Extend memory conversion logic to support tool memory type
- Add test cases for tool memory serialization and deserialization
- Include token counting utilities for text processing tasks
2025-10-16 10:50:27 +08:00

6 lines
No EOL
163 B
Python

import tiktoken
enc = tiktoken.get_encoding("o200k_base")
# r = enc.encode("我爱吃西瓜,你说啥")
r = enc.encode("hello world aaaaaaaaaaaa")
print(len(r))