mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
chore: format
This commit is contained in:
@@ -127,7 +127,11 @@ from langchain_core.documents import Document
|
||||
log = logging.getLogger(__name__)
|
||||
log.setLevel(SRC_LOG_LEVELS["RAG"])
|
||||
|
||||
app = FastAPI(docs_url="/docs" if ENV == "dev" else None, openapi_url="/openapi.json" if ENV == "dev" else None, redoc_url=None)
|
||||
app = FastAPI(
|
||||
docs_url="/docs" if ENV == "dev" else None,
|
||||
openapi_url="/openapi.json" if ENV == "dev" else None,
|
||||
redoc_url=None,
|
||||
)
|
||||
|
||||
app.state.config = AppConfig()
|
||||
|
||||
@@ -537,7 +541,7 @@ async def update_rag_config(form_data: ConfigUpdateForm, user=Depends(get_admin_
|
||||
|
||||
if form_data.web is not None:
|
||||
app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION = (
|
||||
#Note: When UI "Bypass SSL verification for Websites"=True then ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION=False
|
||||
# Note: When UI "Bypass SSL verification for Websites"=True then ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION=False
|
||||
form_data.web.web_loader_ssl_verification
|
||||
)
|
||||
|
||||
@@ -1230,7 +1234,9 @@ def process_web_search(form_data: SearchForm, user=Depends(get_verified_user)):
|
||||
|
||||
urls = [result.link for result in web_results]
|
||||
|
||||
loader = get_web_loader(urls, verify_ssl=app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION)
|
||||
loader = get_web_loader(
|
||||
urls, verify_ssl=app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION
|
||||
)
|
||||
docs = loader.load()
|
||||
|
||||
save_docs_to_vector_db(docs, collection_name, overwrite=True)
|
||||
|
||||
Reference in New Issue
Block a user