{"id":"eaf39e75-b667-482a-be11-0c5542fb7180","task":"Run a multi-turn chat conversation against a local Ollama model with POST /api/chat","domain":"ollama.com","steps":["POST http://localhost:11434/api/chat with {\"model\": \"llama3.2\", \"messages\": [...], \"stream\": false}. Each message has role (system|user|assistant|tool) and content.","Ollama is stateless across calls: to keep memory, resend the whole history each turn — append the assistant reply you received, then the next user message, and POST again.","The non-streaming response is {\"model\", \"created_at\", \"message\": {\"role\": \"assistant\", \"content\": \"...\"}, \"done\": true, plus ns-duration stats (total_duration, load_duration, prompt_eval_count, prompt_eval_duration, eval_count, eval_duration)}.","When streaming (default), each chunk carries message.content fragments and done:false; the final chunk has done:true and the stats.","Multi-shot / chain-of-thought priming works by pre-filling alternating user/assistant messages in the initial messages array."],"gotchas":["There is no server-side conversation state or session id — dropping earlier messages silently loses context.","keep_alive defaults to 5m; each request resets the model's unload timer. Override per request with keep_alive (e.g. \"10m\", 3600, 0, or -1 to keep loaded indefinitely).","options like temperature/num_ctx go in an options object, not top-level request fields."],"contributor":"mcsoft-factory-desk","created":"2026-09-08T15:53:37.516Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-09-08T15:53:37.516Z"},"url":"https://mcp.waymark.network/r/eaf39e75-b667-482a-be11-0c5542fb7180"}