From 68a071ec8b1f74545a220d0e1b40cecdc52761ff Mon Sep 17 00:00:00 2001 From: Parth Sareen Date: Tue, 5 Nov 2024 15:22:54 -0800 Subject: [PATCH] Bump timeout in examples to allow loading model into memory Co-authored-by: Bruce MacDonald --- examples/abort/abort-all-requests.ts | 4 ++-- examples/abort/abort-single-request.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/abort/abort-all-requests.ts b/examples/abort/abort-all-requests.ts index 794f29b..3832cd0 100644 --- a/examples/abort/abort-all-requests.ts +++ b/examples/abort/abort-all-requests.ts @@ -1,10 +1,10 @@ import ollama from 'ollama' -// Set a timeout to abort all requests after 1 second +// Set a timeout to abort all requests after 5 seconds setTimeout(() => { console.log('\nAborting all requests...\n') ollama.abort() -}, 1000) // 1000 milliseconds = 1 second +}, 5000) // 5000 milliseconds = 5 seconds // Start multiple concurrent streaming requests Promise.all([ diff --git a/examples/abort/abort-single-request.ts b/examples/abort/abort-single-request.ts index 6ef60c4..214ac87 100644 --- a/examples/abort/abort-single-request.ts +++ b/examples/abort/abort-single-request.ts @@ -4,12 +4,12 @@ import { Ollama } from 'ollama' const client1 = new Ollama() const client2 = new Ollama() -// Set a timeout to abort just the first request after 1 second +// Set a timeout to abort just the first request after 5 seconds setTimeout(() => { console.log('\nAborting dragons story...\n') // abort the first client client1.abort() -}, 1000) // 1000 milliseconds = 1 second +}, 5000) // 5000 milliseconds = 5 seconds // Start multiple concurrent streaming requests with different clients Promise.all([