mirror of
https://github.com/GH05TCREW/pentestagent.git
synced 2026-03-07 14:23:20 +00:00
feat: add debug logging for LiteLLM
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""LiteLLM wrapper for PentestAgent."""
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import random
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING, Any, AsyncIterator, List, Optional
|
||||
@@ -53,6 +54,14 @@ class LLM:
|
||||
|
||||
# Drop unsupported params for models that don't support them
|
||||
litellm.drop_params = True
|
||||
|
||||
# Enable debug mode if PENTESTAGENT_DEBUG is set
|
||||
if os.getenv("PENTESTAGENT_DEBUG", "false").lower() in ("true", "1", "yes"):
|
||||
litellm.set_verbose = True
|
||||
import logging
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
self._litellm = litellm
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
|
||||
Reference in New Issue
Block a user