const res = await fetch("http://localhost:11434/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "qwen3:8b",
messages: [{ role: "user", content: "列出三個學習 Python 的建議" }],
stream: false,
}),
});
const data = await res.json();
console.log(data.message.content);