mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 10:55:17 +00:00
doc update and minor fix
This commit is contained in:
parent
dc46acb762
commit
27a7c1a94f
1 changed files with 1 additions and 2 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import os
|
import os
|
||||||
from azure.identity import ClientSecretCredential
|
|
||||||
import litellm
|
import litellm
|
||||||
import openai
|
import openai
|
||||||
import requests
|
import requests
|
||||||
|
|
@ -100,7 +99,6 @@ class LiteLLMAIHandler(BaseAiHandler):
|
||||||
|
|
||||||
# Check for Azure AD configuration
|
# Check for Azure AD configuration
|
||||||
if get_settings().get("AZURE_AD.CLIENT_ID", None):
|
if get_settings().get("AZURE_AD.CLIENT_ID", None):
|
||||||
from azure.identity import ClientSecretCredential
|
|
||||||
self.azure = True
|
self.azure = True
|
||||||
# Generate access token using Azure AD credentials from settings
|
# Generate access token using Azure AD credentials from settings
|
||||||
access_token = self._get_azure_ad_token()
|
access_token = self._get_azure_ad_token()
|
||||||
|
|
@ -130,6 +128,7 @@ class LiteLLMAIHandler(BaseAiHandler):
|
||||||
Returns:
|
Returns:
|
||||||
str: The access token
|
str: The access token
|
||||||
"""
|
"""
|
||||||
|
from azure.identity import ClientSecretCredential
|
||||||
try:
|
try:
|
||||||
credential = ClientSecretCredential(
|
credential = ClientSecretCredential(
|
||||||
tenant_id=get_settings().azure_ad.tenant_id,
|
tenant_id=get_settings().azure_ad.tenant_id,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue