diff --git a/README.md b/README.md index f869bbf..d18d78f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ npm i ollama import ollama from 'ollama' const response = await ollama.chat({ - model: 'llama2', + model: 'llama3.1', messages: [{ role: 'user', content: 'Why is the sky blue?' }], }) console.log(response.message.content) @@ -34,7 +34,7 @@ Response streaming can be enabled by setting `stream: true`, modifying function import ollama from 'ollama' const message = { role: 'user', content: 'Why is the sky blue?' } -const response = await ollama.chat({ model: 'llama2', messages: [message], stream: true }) +const response = await ollama.chat({ model: 'llama3.1', messages: [message], stream: true }) for await (const part of response) { process.stdout.write(part.message.content) } @@ -46,7 +46,7 @@ for await (const part of response) { import ollama from 'ollama' const modelfile = ` -FROM llama2 +FROM llama3.1 SYSTEM "You are mario from super mario bros." ` await ollama.create({ model: 'example', modelfile: modelfile }) @@ -209,7 +209,7 @@ import { Ollama } from 'ollama' const ollama = new Ollama({ host: 'http://127.0.0.1:11434' }) const response = await ollama.chat({ - model: 'llama2', + model: 'llama3.1', messages: [{ role: 'user', content: 'Why is the sky blue?' }], }) ``` diff --git a/examples/abort/any-request.ts b/examples/abort/any-request.ts index 76487c2..84ae5c4 100644 --- a/examples/abort/any-request.ts +++ b/examples/abort/any-request.ts @@ -8,7 +8,7 @@ setTimeout(() => { try { ollama.generate({ - model: 'llama2', + model: 'llama3.1', prompt: 'Write a long story', stream: true, }).then( diff --git a/examples/abort/specific-request.ts b/examples/abort/specific-request.ts index 6c5dd75..7b57987 100644 --- a/examples/abort/specific-request.ts +++ b/examples/abort/specific-request.ts @@ -11,7 +11,7 @@ setTimeout(() => { try { ollama.generate({ - model: 'llama2', + model: 'llama3.1', prompt: 'Write a long story', stream: true, }).then( diff --git a/examples/pull-progress/pull.ts b/examples/pull-progress/pull.ts index 565247e..5d04945 100644 --- a/examples/pull-progress/pull.ts +++ b/examples/pull-progress/pull.ts @@ -1,6 +1,6 @@ import ollama from 'ollama' -const model = 'llama2' +const model = 'llama3.1' console.log(`downloading ${model}...`) let currentDigestDone = false const stream = await ollama.pull({ model: model, stream: true })