实现自动状态清理以防止“请求实体过大”(413)错误,同时保护正在进行的任务。使用针对已完成任务的有针对性过滤,而不是完全重置状态,并添加安全检查以确保不会意外删除任何活动的买家/卖家任务。这在保持有效载荷大小可控的同时维护数据完整性。
示例代码:
python: https://github.com/game-by-virtuals/game-python/blob/feat/acp/plugins/acp/tools/reduce_agent_state.pyarrow-up-right
node: https://github.com/game-by-virtuals/game-node/blob/feat/acp-plugin/plugins/acpPlugin/tools/reduceAgentState.tsarrow-up-right
最后更新于2个月前