mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-08 03:10:24 +00:00
docs(context): add documentation for
This commit is contained in:
parent
22ccb4b83f
commit
7fe953a8d5
1 changed files with 24 additions and 0 deletions
|
|
@ -18,3 +18,27 @@ class ContextCompactOp(BaseAsyncOp):
|
|||
|
||||
self.context["messages"] = messages
|
||||
self.context["offloaded_data"] = {"f": "ddd"}
|
||||
|
||||
|
||||
"""
|
||||
1. token counter 计数,最长上下文X20%=20K
|
||||
1. openai tiktoken / hagggingface / modelscope / rule-based
|
||||
self.token_counter.count()
|
||||
2. tool:
|
||||
1. dump_tool(write_file)
|
||||
2. grep / rip_grep / read_file
|
||||
3. compact:
|
||||
if > threashold(20K):
|
||||
tool_call -> write_file
|
||||
写一个引用:/xx/xxx/xxx.txt。是否保留前面的token()
|
||||
4. compress:
|
||||
1. prompt
|
||||
2. context -> write_file
|
||||
|
||||
|
||||
1. case study:
|
||||
2. messages
|
||||
1. agentscope: reme
|
||||
2. http远程 reme
|
||||
|
||||
"""
|
||||
Loading…
Add table
Reference in a new issue