mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 15:38:00 -05:00
fix(kb): add base URL for kb fetches (#1701)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user