跳到正文
DEV Community· Taha Khan·· 4 小時前AI 評分35

GhostMemo:以本地 AI 將回憶化作鬼故事

GhostMemo: Keeping Memories Alive with a Local AI Ghost Storyteller.

AI 導讀

GhostMemo 是一款記憶日誌,能透過本地 AI 模型把用戶保存的回憶改寫成帶有虛構細節的鬼故事。項目使用 Ollama 和 Gemma 3 1B(gemma3:1b)生成故事,回憶儲存在瀏覽器的本機儲存空間,並可刪除。故事請求傳送至本機 Ollama,而非 GhostMemo 伺服器。

正文

Taha Khan

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

GhostMemo is a small memory journal with a ghost-story feature. I built it to give saved memories an eerie second life: write a memory, save it in the browser, and ask an AI model to turn it into a mysterious fictional retelling.

Memories stay in the browser’s local storage, and each one can be deleted. The generated story is shown as fiction because the model may invent details that were not in the original memory.

Demo

Open the GhostMemo website

The website shows the project, but its AI storyteller works in the local version with Ollama running on my computer. GitHub Pages cannot connect to the Ollama model on my laptop.

Code

View the GhostMemo code on GitHub

How I Built It

GhostMemo uses HTML, CSS, and JavaScript in a single index.html file. JavaScript saves and displays memories using the browser’s local storage.

For the storyteller, I connected the page to Ollama running on my computer and used Gemma 3 1B (gemma3:1b). When I click the ghost-story button, the app sends the memory to my local Ollama model and displays the response with a label explaining that it may contain invented details. No API key is included in the browser code.

Why Does Open Innovation Matter?

Using an open-weight model let me try AI storytelling on my own computer without paying for a hosted AI API or putting an API key in my website code. The memory stays in my browser, and the story request goes to Ollama running locally rather than to a GhostMemo server.

I can learn from the model’s output and change the project as I improve it. That control is important for a project built around personal memories.

The Spirit of It

My first test started with a few lines about hearing knocks at a locked door. Gemma turned it into a much longer ghost story, adding details that were never in my memory. That surprised

來源:DEV Community · dev.to