Add callback functionality to litellm_ai_handler for enhanced logging and metadata capture

This commit is contained in:
mrT23
2024-08-17 09:15:05 +03:00
parent 81081186d9
commit c76aabc71e
3 changed files with 31 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class PRAgent:
if action not in command2class:
get_logger().debug(f"Unknown command: {action}")
return False
with get_logger().contextualize(command=action):
with get_logger().contextualize(command=action, pr_url=pr_url):
get_logger().info("PR-Agent request handler started", analytics=True)
if action == "reflect_and_review":
get_settings().pr_reviewer.ask_and_reflect = True