microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
34.85k stars 5.05k forks source link

Controlling the printing output of agents #3978

Open Kunjal1999 opened 4 weeks ago

Kunjal1999 commented 4 weeks ago

What happened?

How can we control the output of the code executor? Can we let the executor print only some lines of the output of the code generated? The terminal is crashing when the output of the code is extremely large (~1000 lines or so)

   @staticmethod
    def create_user_proxy_agent() -> autogen.UserProxyAgent:
        x= autogen.UserProxyAgent(
            name="user_proxy",
            human_input_mode="TERMINATE",
            max_consecutive_auto_reply=1,
            code_execution_config={
                "executor": LocalCommandLineCodeExecutor(work_dir="coding"),
            },
        ) 

What did you expect to happen?

Control code printing on the screen.

How can we reproduce it (as minimally and precisely as possible)?

https://github.com/microsoft/autogen/issues/3896#issue-2606804632

AutoGen version

0.2

Which package was this bug in

AgentChat

Model used

No response

Python version

No response

Operating system

No response

Any additional info you think would be helpful for fixing this bug

No response

ekzhu commented 4 weeks ago

Can you set silent=True to UserProxyAgent?

Kunjal1999 commented 4 weeks ago

Hello, I don't want a complete blank output, I want it to be controlled upto 1000 lines.