When UI "Bypass SSL verification for Websites"=True then ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION=False

This commit is contained in:
Davi Sclifo Zucon 2024-11-04 16:29:29 -03:00
parent 35a9140567
commit a70e5a0f30
2 changed files with 5 additions and 5 deletions

View File

@ -428,7 +428,7 @@ async def get_rag_config(user=Depends(get_admin_user)):
"translation": app.state.YOUTUBE_LOADER_TRANSLATION, "translation": app.state.YOUTUBE_LOADER_TRANSLATION,
}, },
"web": { "web": {
"web_loader_ssl_verification": not app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION, "web_loader_ssl_verification": app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION,
"search": { "search": {
"enabled": app.state.config.ENABLE_RAG_WEB_SEARCH, "enabled": app.state.config.ENABLE_RAG_WEB_SEARCH,
"engine": app.state.config.RAG_WEB_SEARCH_ENGINE, "engine": app.state.config.RAG_WEB_SEARCH_ENGINE,
@ -536,9 +536,9 @@ async def update_rag_config(form_data: ConfigUpdateForm, user=Depends(get_admin_
app.state.YOUTUBE_LOADER_TRANSLATION = form_data.youtube.translation app.state.YOUTUBE_LOADER_TRANSLATION = form_data.youtube.translation
if form_data.web is not None: if form_data.web is not None:
# if "Bypass SSL verification for Websites" == True then web_loader_ssl_verification = False.
app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION = ( app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION = (
not form_data.web.web_loader_ssl_verification #Note: When UI "Bypass SSL verification for Websites"=True then ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION=False
form_data.web.web_loader_ssl_verification
) )
app.state.config.ENABLE_RAG_WEB_SEARCH = form_data.web.search.enabled app.state.config.ENABLE_RAG_WEB_SEARCH = form_data.web.search.enabled
@ -593,7 +593,7 @@ async def update_rag_config(form_data: ConfigUpdateForm, user=Depends(get_admin_
"translation": app.state.YOUTUBE_LOADER_TRANSLATION, "translation": app.state.YOUTUBE_LOADER_TRANSLATION,
}, },
"web": { "web": {
"web_loader_ssl_verification": not app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION, "web_loader_ssl_verification": app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION,
"search": { "search": {
"enabled": app.state.config.ENABLE_RAG_WEB_SEARCH, "enabled": app.state.config.ENABLE_RAG_WEB_SEARCH,
"engine": app.state.config.RAG_WEB_SEARCH_ENGINE, "engine": app.state.config.RAG_WEB_SEARCH_ENGINE,

View File

@ -319,7 +319,7 @@
}} }}
type="button" type="button"
> >
{#if webConfig.web_loader_ssl_verification === true} {#if webConfig.web_loader_ssl_verification === false}
<span class="ml-2 self-center">{$i18n.t('On')}</span> <span class="ml-2 self-center">{$i18n.t('On')}</span>
{:else} {:else}
<span class="ml-2 self-center">{$i18n.t('Off')}</span> <span class="ml-2 self-center">{$i18n.t('Off')}</span>