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:3bmodel. - Fixed the issue where PowerShell could not recognize the
ollamacommand by updating my systemPATH. - Learned that Ollama automatically starts its own server, so running
ollama serveagain 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.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.