mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-11 02:04:24 +01:00
Reduce log spam
This commit is contained in:
@@ -31,15 +31,11 @@ def sanitize_path_arg(arg_name: str, make_relative: bool = False):
|
||||
@functools.wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
logger.debug(f"Sanitizing arg '{arg_name}' on function '{func.__name__}'")
|
||||
logger.debug(f"Function annotations: {func.__annotations__}")
|
||||
|
||||
# Get Agent from the called function's arguments
|
||||
agent = kwargs.get(
|
||||
"agent", len(args) > agent_arg_index and args[agent_arg_index]
|
||||
)
|
||||
logger.debug(f"Args: {args}")
|
||||
logger.debug(f"KWArgs: {kwargs}")
|
||||
logger.debug(f"Agent argument lifted from function call: {agent}")
|
||||
if not isinstance(agent, Agent):
|
||||
raise RuntimeError("Could not get Agent from decorated command's args")
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ def summarize_text(
|
||||
# "Only respond with a concise summary or description of the user message."
|
||||
)
|
||||
|
||||
logger.debug(f"Summarizing with {model}:\n{summarization_prompt.dump()}\n")
|
||||
summary = create_chat_completion(
|
||||
prompt=summarization_prompt, config=config, temperature=0, max_tokens=500
|
||||
).content
|
||||
|
||||
Reference in New Issue
Block a user