You are browsing as a guest. Sign up (or log in) to start making projects!

1h 22m 17s logged

Dev Log #6 – Local AI Integration with Ollama

Overview

Today I addeed a completely local AI model using Ollama. I researched local large language models and decided to integrate the Llama 3.2 3B model through Ollama.

What I Worked On

  • Installed Ollama and downloaded the llama3.2:3b model.
  • Fixed the issue where PowerShell could not recognize the ollama command by updating my system PATH.
  • Learned that Ollama automatically starts its own server, so running ollama serve again caused a port conflict.
  • Created a Node.js backend using Express and CORS.
  • Connected the backend to Ollama’s local API.
  • Updated the React frontend to send AI requests to my local backend instead of OpenRouter.
  • Removed the dependency on paid AI APIs.

Challenges

One of the biggest challenges was getting the backend running correctly. I accidentally tried to run server.js before creating the file, which caused a MODULE_NOT_FOUND error. After creating the server and installing the required packages, I was able to start it successfully.

Another challenge was that the AI initially hallucinated events like holidays and birthdays that weren’t actually on my calendar. To fix this, I rewrote the prompt to clearly instruct the model to only use the calendar events provided and never invent additional information.

Improvements

I redesigned the AI briefing prompt so it now:

  • Uses only events from the next 7 days.
  • Creates a structured daily briefing.
  • Highlights upcoming due dates, tests, meetings, and deadlines.
  • Suggests what to focus on for the day.
  • Ends with a short motivational message.
  • Avoids generating fake events.

Result

The AI summary feature now runs entirely on my own computer with:

  • No API keys
  • No usage limits
  • Faster response times
  • Better privacy because calendar data never leaves my computer.

The morning briefing is much more useful and feels like a real student assistant instead of a generic chatbot.

0
4

Comments 0

No comments yet. Be the first!