@@ -50,16 +50,13 @@ def on_tool_start(
50
50
) -> None :
51
51
logging .debug (f"on_tool_start input_str={ input_str } " )
52
52
53
- def on_agent_action (
54
- self , action : AgentAction , color : Optional [str ] = None , ** kwargs : Any
55
- ) -> Any :
53
+ def on_agent_action (self , action : AgentAction , ** kwargs : Any ) -> Any :
56
54
"""Run on agent action."""
57
55
logging .info (f"{ action .log } " )
58
56
59
57
def on_tool_end (
60
58
self ,
61
59
output : str ,
62
- color : Optional [str ] = None ,
63
60
observation_prefix : Optional [str ] = None ,
64
61
llm_prefix : Optional [str ] = None ,
65
62
** kwargs : Any ,
@@ -70,18 +67,10 @@ def on_tool_end(
70
67
def on_tool_error (self , error : Union [Exception , KeyboardInterrupt ], ** kwargs : Any ) -> None :
71
68
logging .error (f"on_tool_error error={ error !s} " )
72
69
73
- def on_text (
74
- self ,
75
- text : str ,
76
- color : Optional [str ] = None ,
77
- end : str = "" ,
78
- ** kwargs : Optional [str ],
79
- ) -> None :
70
+ def on_text (self , text : str , ** kwargs : Optional [str ]) -> None :
80
71
"""Run when agent ends."""
81
- logging .info (f" { text } " )
72
+ logging .info (text )
82
73
83
- def on_agent_finish (
84
- self , finish : AgentFinish , color : Optional [str ] = None , ** kwargs : Any
85
- ) -> None :
74
+ def on_agent_finish (self , finish : AgentFinish , ** kwargs : Any ) -> None :
86
75
"""Run on agent end."""
87
76
logging .info (f"{ finish .log } " )
0 commit comments