diff --git a/src/browser.ts b/src/browser.ts index 4599ab6..28fd322 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -337,7 +337,7 @@ async encodeImage(image: Uint8Array | string): Promise { if (!request.query || request.query.length === 0) { throw new Error('Query is required') } - const response = await utils.post(this.fetch, `https://ollama.com/api/web_search`, { ...request }, { + const response = await utils.post(this.fetch, `${this.config.host}/api/web_search`, { ...request }, { headers: this.config.headers }) return (await response.json()) as WebSearchResponse @@ -353,7 +353,7 @@ async encodeImage(image: Uint8Array | string): Promise { if (!request.url || request.url.length === 0) { throw new Error('URL is required') } - const response = await utils.post(this.fetch, `https://ollama.com/api/web_fetch`, { ...request }, { headers: this.config.headers }) + const response = await utils.post(this.fetch, `${this.config.host}/api/web_fetch`, { ...request }, { headers: this.config.headers }) return (await response.json()) as WebFetchResponse } }