// https://github.com/ollama/ollama-js
import ollama from 'ollama';

// Generate
const response = await ollama.generate({
  model: 'deepseek-r1:latest',
  prompt: 'tell a joke',
  think: false,
});
console.log('Generate:', response);

// Chat
const responseChat = await ollama.chat({
  model: 'deepseek-r1:latest',
  messages: [{ role: 'user', content: 'tell a joke' }],
  think: false,
});
console.log('Chat:', responseChat);
