Skip to content

dkackman/ChatFish

Repository files navigation

ChatFish

ChatFish is a whimsical React SPA: a tank of animated fish where you chat with an AI fish that runs entirely in your browser. There is no server-side inference and no chat data ever leaves your machine — the language model is downloaded and executed locally via web-llm.

Features

  • A friendly AI fish powered by a local LLM (default: Llama-3.2-1B-Instruct).
  • Swimming, draggable fish with speech-bubble messages.
  • Slash commands: /help, /about, /llm (configure the model), plus /shout and /whisper emotes.
  • Offline-aware and installable as a PWA.

Requirements

  • A browser with WebGPU support (recent Chrome, Edge, or Firefox). web-llm cannot run without it.
  • Enough disk/GPU memory to download and host the selected model. Models are fetched in the browser on first use and cached, so the initial download can be large (hundreds of MB to several GB depending on the model).
  • Node.js 24+ to build and run.

Running locally

npm install
npm run dev

Then open the URL printed in the console. Open the LLM settings (the /llm command or the settings dialog), pick a model, and click Download. Once the model finishes loading, chat with the orange AI fish.

How it works

  • React renders the fish-tank UI; a fixed-step animation loop drives the fish physics (src/engine/) and writes positions directly to the DOM.
  • src/llm/ drives web-llm, which runs the model in a dedicated Web Worker to keep the UI responsive.
  • npm test runs the unit tests; npm run build outputs a static site to dist/.

digstore notes

dig.toml configures the on-chain store for publishing. The store-id is a Chia DID, and the output-dir is dist/. The build-command is run before each digstore deploy.

# needed to switch form teh previous blazor version
digstore unstage            # drop the stale discovery manifest
digstore dir dist           # repoint the store's content root to dist/

# regular publish workflow
digstore add -A             # now stages your actual build output
digstore add --discovery    # regenerate the manifest over the real file set
digstore staged             # sanity-check the list before spending
digstore commit -m "React rewrite"
digstore push

License

See LICENSE.txt.

About

A SPA AI chat app. With fish.

Topics

Resources

License

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors