Skip to content

Commit

Permalink
Bump timeout in examples to allow loading model into memory
Browse files Browse the repository at this point in the history
Co-authored-by: Bruce MacDonald <[email protected]>
  • Loading branch information
ParthSareen and BruceMacD authored Nov 5, 2024
1 parent e2aef0b commit 68a071e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/abort/abort-all-requests.ts
Original file line number Diff line number Diff line change
@@ -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([
Expand Down
4 changes: 2 additions & 2 deletions examples/abort/abort-single-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down

0 comments on commit 68a071e

Please sign in to comment.