File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 25
25
from .run_tool_calling_llm import run_tool_calling_llm
26
26
from .utils .convert_to_openai_messages import convert_to_openai_messages
27
27
28
+ import logging
29
+
30
+ # Create or get the logger
31
+ logger = logging .getLogger ('LiteLLM' )
32
+
33
+ class SuppressDebugFilter (logging .Filter ):
34
+ def filter (self , record ):
35
+ # Suppress only the specific message containing the keywords
36
+ if "cost map" in record .getMessage ():
37
+ return False # Suppress this log message
38
+ return True # Allow all other messages
28
39
29
40
class Llm :
30
41
"""
31
42
A stateless LMC-style LLM with some helpful properties.
32
43
"""
33
44
34
45
def __init__ (self , interpreter ):
46
+ # Add the filter to the logger
47
+ logger .addFilter (SuppressDebugFilter ())
48
+
35
49
# Store a reference to parent interpreter
36
50
self .interpreter = interpreter
37
51
You can’t perform that action at this time.
0 commit comments