@@ -44,7 +44,7 @@ def filter(self, record: logging.LogRecord) -> bool:
4444
4545# Function to run the alembic migrations
4646def run_migrations ():
47- print ("Running migrations" )
47+ log . info ("Running migrations" )
4848 try :
4949 from alembic import command
5050 from alembic .config import Config
@@ -57,7 +57,7 @@ def run_migrations():
5757
5858 command .upgrade (alembic_cfg , "head" )
5959 except Exception as e :
60- print (f"Error: { e } " )
60+ log . exception (f"Error running migrations : { e } " )
6161
6262
6363run_migrations ()
@@ -678,6 +678,10 @@ def oidc_oauth_register(client):
678678S3_BUCKET_NAME = os .environ .get ("S3_BUCKET_NAME" , None )
679679S3_KEY_PREFIX = os .environ .get ("S3_KEY_PREFIX" , None )
680680S3_ENDPOINT_URL = os .environ .get ("S3_ENDPOINT_URL" , None )
681+ S3_USE_ACCELERATE_ENDPOINT = (
682+ os .environ .get ("S3_USE_ACCELERATE_ENDPOINT" , "False" ).lower () == "true"
683+ )
684+ S3_ADDRESSING_STYLE = os .environ .get ("S3_ADDRESSING_STYLE" , None )
681685
682686GCS_BUCKET_NAME = os .environ .get ("GCS_BUCKET_NAME" , None )
683687GOOGLE_APPLICATION_CREDENTIALS_JSON = os .environ .get (
@@ -1094,7 +1098,7 @@ class BannerModel(BaseModel):
10941098 banners = json .loads (os .environ .get ("WEBUI_BANNERS" , "[]" ))
10951099 banners = [BannerModel (** banner ) for banner in banners ]
10961100except Exception as e :
1097- print (f"Error loading WEBUI_BANNERS: { e } " )
1101+ log . exception (f"Error loading WEBUI_BANNERS: { e } " )
10981102 banners = []
10991103
11001104WEBUI_BANNERS = PersistentConfig ("WEBUI_BANNERS" , "ui.banners" , banners )
@@ -1566,6 +1570,18 @@ class BannerModel(BaseModel):
15661570 os .environ .get ("GOOGLE_DRIVE_API_KEY" , "" ),
15671571)
15681572
1573+ ENABLE_ONEDRIVE_INTEGRATION = PersistentConfig (
1574+ "ENABLE_ONEDRIVE_INTEGRATION" ,
1575+ "onedrive.enable" ,
1576+ os .getenv ("ENABLE_ONEDRIVE_INTEGRATION" , "False" ).lower () == "true" ,
1577+ )
1578+
1579+ ONEDRIVE_CLIENT_ID = PersistentConfig (
1580+ "ONEDRIVE_CLIENT_ID" ,
1581+ "onedrive.client_id" ,
1582+ os .environ .get ("ONEDRIVE_CLIENT_ID" , "" ),
1583+ )
1584+
15691585# RAG Content Extraction
15701586CONTENT_EXTRACTION_ENGINE = PersistentConfig (
15711587 "CONTENT_EXTRACTION_ENGINE" ,
@@ -1579,6 +1595,18 @@ class BannerModel(BaseModel):
15791595 os .getenv ("TIKA_SERVER_URL" , "http://tika:9998" ), # Default for sidecar deployment
15801596)
15811597
1598+ DOCUMENT_INTELLIGENCE_ENDPOINT = PersistentConfig (
1599+ "DOCUMENT_INTELLIGENCE_ENDPOINT" ,
1600+ "rag.document_intelligence_endpoint" ,
1601+ os .getenv ("DOCUMENT_INTELLIGENCE_ENDPOINT" , "" ),
1602+ )
1603+
1604+ DOCUMENT_INTELLIGENCE_KEY = PersistentConfig (
1605+ "DOCUMENT_INTELLIGENCE_KEY" ,
1606+ "rag.document_intelligence_key" ,
1607+ os .getenv ("DOCUMENT_INTELLIGENCE_KEY" , "" ),
1608+ )
1609+
15821610RAG_TOP_K = PersistentConfig (
15831611 "RAG_TOP_K" , "rag.top_k" , int (os .environ .get ("RAG_TOP_K" , "3" ))
15841612)
0 commit comments