mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-06 05:40:38 +08:00
Merge branch 'base-ai-handler' into abstract-BaseAiHandler
This commit is contained in:
@ -17,7 +17,9 @@ from pr_agent.git_providers.utils import apply_repo_settings
|
||||
from pr_agent.git_providers.git_provider import IncrementalPR
|
||||
from pr_agent.log import LoggingFormat, get_logger, setup_logger
|
||||
from pr_agent.servers.utils import verify_signature, DefaultDictWithTimeout
|
||||
from pr_agent.algo.ai_handlers.litellm_ai_handler import LiteLLMAiHandler
|
||||
|
||||
litellm_ai_handler = LiteLLMAiHandler()
|
||||
setup_logger(fmt=LoggingFormat.JSON)
|
||||
|
||||
router = APIRouter()
|
||||
@ -79,7 +81,7 @@ async def handle_request(body: Dict[str, Any], event: str):
|
||||
action = body.get("action")
|
||||
if not action:
|
||||
return {}
|
||||
agent = PRAgent()
|
||||
agent = PRAgent(ai_handler=litellm_ai_handler)
|
||||
bot_user = get_settings().github_app.bot_user
|
||||
sender = body.get("sender", {}).get("login")
|
||||
log_context = {"action": action, "event": event, "sender": sender, "server_type": "github_app"}
|
||||
|
Reference in New Issue
Block a user