fix(kb): add base URL for kb fetches (#1701)

This commit is contained in:
Waleed
2025-10-21 12:02:18 -07:00
committed by GitHub
parent ce660e2df9
commit eb8995ee7c

View File

@@ -407,11 +407,16 @@ async function parseWithMistralOCR(fileUrl: string, filename: string, mimeType:
try {
const response = await retryWithExponentialBackoff(
async () => {
const url =
let url =
typeof mistralParserTool.request!.url === 'function'
? mistralParserTool.request!.url(params)
: mistralParserTool.request!.url
if (url.startsWith('/')) {
const { getBaseUrl } = await import('@/lib/urls/utils')
url = `${getBaseUrl()}${url}`
}
const headers =
typeof mistralParserTool.request!.headers === 'function'
? mistralParserTool.request!.headers(params)