We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 603df9f commit 75baea0Copy full SHA for 75baea0
src/browser.ts
@@ -327,6 +327,17 @@ async encodeImage(image: Uint8Array | string): Promise<string> {
327
return (await response.json()) as ListResponse
328
}
329
330
+ /**
331
+ * Returns the Ollama server version.
332
+ * @returns {Promise<{version: string}>} - The server version object.
333
+ */
334
+ async version(): Promise<{ version: string }> {
335
+ const response = await utils.get(this.fetch, `${this.config.host}/api/version`, {
336
+ headers: this.config.headers,
337
+ })
338
+ return (await response.json()) as { version: string }
339
+ }
340
+
341
/**
342
* Performs web search using the Ollama web search API
343
* @param request {WebSearchRequest} - The search request containing query and options
0 commit comments