If I have AgentExecutor:
agent_executor = AgentExecutor(
agent=agent,
tools=tools,
verbose=True,
...
)
I get logs like this:
Is there any way to edit colors, boldness etc. of these logs?
I tried to look in the documentation, but it seems there isn’t an official way to do it. Another solution was to get intermediate output as text, turn verbose off, and just print it manually, but I want to print the logs when they come from the agent.
On my experience I haven’t used functionality of changing color, but I can suggest trying to use Custom Output Parsers and add there some ANSI codes:
# Define desired color
RED = "33[91m" #ANSI code
output = "Some agents text"
# Print the output with desired color
print(f"{RED}{output}{END}")
And as the result color will be changed, but you need to identify logic for custom parser, so it could work properly.