fix: change keep length of result from 1000 to 2000.

This commit is contained in:
刘棒棒 2023-12-05 18:58:16 +08:00
parent 20a918bf39
commit b561b2f982

View file

@ -143,10 +143,12 @@ class MLEngineer(Role):
result, success = await self.execute_code.run(code)
# truncated the result
print(truncate(result))
_keep_result_len = 2000
truncate_result = truncate(remove_escape_and_color_codes(result), keep_len=_keep_result_len)
print(truncate_result)
# print(result)
self.working_memory.add(
Message(content=truncate(remove_escape_and_color_codes(result)), role="user", cause_by=ExecutePyCode)
Message(content=truncate_result, keep_len=_keep_result_len), role="user", cause_by=ExecutePyCode)
)
if "!pip" in code: