Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
*/
protected async processStreamableRequest<T extends object>(
endpoint: string,
request: { stream?: boolean } & Record<string, any>,

Check warning on line 75 in src/browser.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
): Promise<T | AbortableAsyncIterator<T>> {
request.stream = request.stream ?? false
const host = `${this.config.host}/api/${endpoint}`
Expand Down Expand Up @@ -337,7 +337,7 @@
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
Expand All @@ -353,7 +353,7 @@
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
}
}
Expand Down
Loading