mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-27 14:25:20 +02:00
Merge branch 'fix_truncate' into 'dev'
Fix truncation See merge request agents/data_agents_opt!15
This commit is contained in:
commit
091a9e888f
1 changed files with 4 additions and 2 deletions
|
|
@ -140,10 +140,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, role="user", cause_by=ExecutePyCode)
|
||||
)
|
||||
|
||||
if "!pip" in code:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue