From 503224e0ba97437d4871f4294c4f2c20cedc44b9 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Thu, 13 Jun 2024 10:33:11 -0700 Subject: [PATCH] fix function signature in node create --- src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index b00882e..598304c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,6 @@ import * as utils from './utils.js' +import { AbortableAsyncIterator } from './utils.js' + import fs, { createReadStream, promises } from 'fs' import { dirname, join, resolve } from 'path' import { createHash } from 'crypto' @@ -138,12 +140,12 @@ export class Ollama extends OllamaBrowser { create( request: CreateRequest & { stream: true }, - ): Promise> + ): Promise> create(request: CreateRequest & { stream?: false }): Promise async create( request: CreateRequest, - ): Promise> { + ): Promise> { let modelfileContent = '' if (request.path) { modelfileContent = await promises.readFile(request.path, { encoding: 'utf8' })