mirror of https://github.com/Mai-with-u/MaiBot.git
Merge branch 'feature/tool-history' of https://github.com/Windpicker-owo/MaiBot into feature/tool-history
commit
1c4b2839c7
|
|
@ -311,9 +311,10 @@ class ToolHistoryManager:
|
||||||
def clear_history(self):
|
def clear_history(self):
|
||||||
"""清除历史记录"""
|
"""清除历史记录"""
|
||||||
self._history.clear()
|
self._history.clear()
|
||||||
self._rotate_file()
|
self._save_history()
|
||||||
logger.info("工具调用历史记录已清除")
|
logger.info("工具调用历史记录已清除")
|
||||||
|
|
||||||
|
|
||||||
def wrap_tool_executor():
|
def wrap_tool_executor():
|
||||||
"""
|
"""
|
||||||
包装工具执行器以添加历史记录功能
|
包装工具执行器以添加历史记录功能
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue