mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
adding support for Anthropic, Cohere, Replicate, Azure
This commit is contained in:
parent
26b008565b
commit
102edcdcf1
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import logging
|
|||
import openai
|
||||
from openai.error import APIError, RateLimitError, Timeout, TryAgain
|
||||
from retry import retry
|
||||
|
||||
from litellm import acompletion
|
||||
from pr_agent.config_loader import get_settings
|
||||
|
||||
OPENAI_RETRIES=5
|
||||
|
|
@ -57,7 +57,7 @@ class AiHandler:
|
|||
TryAgain: If there is an attribute error during OpenAI inference.
|
||||
"""
|
||||
try:
|
||||
response = await openai.ChatCompletion.acreate(
|
||||
response = await acompletion(
|
||||
model=model,
|
||||
deployment_id=self.deployment_id,
|
||||
messages=[
|
||||
|
|
|
|||
Loading…
Reference in a new issue