diff --git a/README.md b/README.md index af522cc..a752c73 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ ollama.chat(request) - `images` ``: (Optional) Images to be included in the message, either as Uint8Array or base64 encoded strings. - `format` ``: (Optional) Set the expected format of the response (`json`). - `stream` ``: (Optional) When true an `AsyncGenerator` is returned. - - `keep_alive` ``: (Optional) How long to keep the model loaded. + - `keep_alive` ``: (Optional) How long to keep the model loaded. A number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc.) - `tools` ``: (Optional) A list of tool calls the model may make. - `options` ``: (Optional) Options to configure the runtime. @@ -93,7 +93,7 @@ ollama.generate(request) - `images` ``: (Optional) Images to be included, either as Uint8Array or base64 encoded strings. - `format` ``: (Optional) Set the expected format of the response (`json`). - `stream` ``: (Optional) When true an `AsyncGenerator` is returned. - - `keep_alive` ``: (Optional) How long to keep the model loaded. + - `keep_alive` ``: (Optional) How long to keep the model loaded. A number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc.) - `options` ``: (Optional) Options to configure the runtime. - Returns: `` @@ -186,7 +186,7 @@ ollama.embed(request) - `model` `` The name of the model used to generate the embeddings. - `input` ` | `: The input used to generate the embeddings. - `truncate` ``: (Optional) Truncate the input to fit the maximum context length supported by the model. - - `keep_alive` ``: (Optional) How long to keep the model loaded. + - `keep_alive` ``: (Optional) How long to keep the model loaded. A number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc.) - `options` ``: (Optional) Options to configure the runtime. - Returns: `` diff --git a/src/interfaces.ts b/src/interfaces.ts index a941c9f..8f8607c 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -55,7 +55,7 @@ export interface GenerateRequest { raw?: boolean format?: string | object images?: Uint8Array[] | string[] - keep_alive?: string | number + keep_alive?: string | number // a number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc) options?: Partial } @@ -100,7 +100,7 @@ export interface ChatRequest { messages?: Message[] stream?: boolean format?: string | object - keep_alive?: string | number + keep_alive?: string | number // a number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc) tools?: Tool[] options?: Partial @@ -146,7 +146,7 @@ export interface EmbedRequest { model: string input: string | string[] truncate?: boolean - keep_alive?: string | number + keep_alive?: string | number // a number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc) options?: Partial } @@ -154,7 +154,7 @@ export interface EmbedRequest { export interface EmbeddingsRequest { model: string prompt: string - keep_alive?: string | number + keep_alive?: string | number // a number (seconds) or a string with a duration unit suffix ("300ms", "1.5h", "2h45m", etc) options?: Partial }