You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import ollama from 'ollama'
const message = { role: 'user', content: 'What color of the sky?' }
const response = await ollama.chat({ model: 'llama2', messages: [message], stream: true })
for await (const part of response) {
process.stdout.write(part.message.content)
}
const message2 = { role: 'user', content: 'What was my first prompt?' }
const response = await ollama.chat({ model: 'llama2', messages: [message2], stream: true })
for await (const part of response) {
process.stdout.write(part.message.content)
}
//result: your first prompt was "What color of the sky?"
The documentation is not clear enough,
How am I supposed to save a session of the current conversation (to continue talking later) and create a new separate chat conversation?
The text was updated successfully, but these errors were encountered:
The documentation is not clear enough,
How am I supposed to save a session of the current conversation (to continue talking later) and create a new separate chat conversation?
The text was updated successfully, but these errors were encountered: