This commit is contained in:
Timothy Jaeryang Baek
2026-08-25 15:47:55 -04:00
parent d198d950c6
commit 140d2cf4b5
2 changed files with 2 additions and 5 deletions
@@ -10,7 +10,6 @@ from langchain_core.documents import Document
log = logging.getLogger(__name__)
DEFAULT_MICROSOFT_WEB_IQ_API_BASE_URL = 'https://api.microsoft.ai/v3'
MICROSOFT_BROWSE_RETRY_STATUS_CODES = {202, 429, 500, 502, 503, 504}
MICROSOFT_BROWSE_MAX_RETRIES = 2
@@ -27,7 +26,7 @@ class MicrosoftWebIQLoader(BaseLoader):
continue_on_failure: bool = True,
) -> None:
self.urls = urls if isinstance(urls, list) else [urls]
self.api_base_url = (api_base_url or DEFAULT_MICROSOFT_WEB_IQ_API_BASE_URL).rstrip('/')
self.api_base_url = api_base_url.rstrip('/')
self.api_key = api_key
self.language = language
self.verify_ssl = verify_ssl
@@ -9,8 +9,6 @@ from open_webui.utils.headers import include_user_info_headers
log = logging.getLogger(__name__)
DEFAULT_MICROSOFT_WEB_IQ_API_BASE_URL = 'https://api.microsoft.ai/v3'
def search_microsoft_web_iq(
api_base_url: str,
@@ -22,7 +20,7 @@ def search_microsoft_web_iq(
user=None,
) -> list[SearchResult]:
try:
api_base_url = (api_base_url or DEFAULT_MICROSOFT_WEB_IQ_API_BASE_URL).rstrip('/')
api_base_url = api_base_url.rstrip('/')
headers = {
'host': urlparse(api_base_url).netloc or 'api.microsoft.ai',
'x-apikey': api_key,