From 594c5a7c8a67c7fdd7dd17937b991466cd06f54e Mon Sep 17 00:00:00 2001 From: mic Date: Tue, 22 Apr 2025 21:24:03 +0200 Subject: [PATCH] refactor: update fetchResponse to nest num_ctx within options. see #351 --- js/api/ollama.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/api/ollama.js b/js/api/ollama.js index c08fc2e5..5cc41215 100644 --- a/js/api/ollama.js +++ b/js/api/ollama.js @@ -80,7 +80,7 @@ export class Ollama { model: this.model, messages: messages, stream: this.stream, - ...(this.num_ctx > 0 ? { num_ctx: parseInt(this.num_ctx) } : {}) + ...(this.num_ctx > 0 ? { options: { num_ctx: parseInt(this.num_ctx) } } : {}) }), }); return response;