MCPcopy Index your code
hub / github.com/ivanfioravanti/chatbot-ollama

github.com/ivanfioravanti/chatbot-ollama @v0.5.1 sqlite

repository ↗ · DeepWiki ↗ · release v0.5.1 ↗
242 symbols 496 edges 93 files 0 documented · 0%
README

Chatbot Ollama

About

Chatbot Ollama is an open source chat UI for Ollama.

This project is based on chatbot-ui by Mckay Wrigley.

Chatbot Ollama – Dark

Chatbot Ollama – Light

If the image does not render, place the new screenshot at public/screenshots/screenshot-2025-09-dark.png (light version optional at public/screenshots/screenshot-2025-09-light.png).

Highlights (new)

  • Blue theme polished for light and dark modes with consistent sidebars, headers, and overlays.
  • Document upload (PDF, TXT, MD):
  • PDFs parsed server‑side for reliability; text/markdown read client‑side.
  • The full (truncated) content is attached invisibly to the model prompt — the UI stays clean.
  • 50 MB size cap, 100 page cap (PDF), 50k characters per attachment.
  • Image upload: attach images and send them to vision‑capable models (base64). Non‑vision models simply ignore images.
  • Code blocks: copy button, language label, optional line numbers, line‑wrap toggle, and “download as file”.
  • Streaming & control: Stop Generation button, auto‑scroll toggle (pause/resume when you scroll up).
  • Keyboard shortcuts:
  • Enter to send, Shift+Enter for newline
  • Esc to blur input
  • Ctrl/Cmd+L clears the composer
  • Arrow Up recalls the last user message
  • Error handling: a consistent toast shows details, Copy details, and Retry.
  • Conversation tools: Copy messages button copies the whole visible conversation (with role labels and any attached content).
  • Sidebar UX: search inputs are theme‑aware, prompts list matches chat list styling, improved hover/selection.

Updates

Chatbot Ollama will be updated over time.

Next up

  • [ ] Model management (pull/delete)
  • [ ] Model info/details dialog

Docker

Build locally:

docker build -t chatbot-ollama .
docker run -p 3000:3000 chatbot-ollama

Pull from ghcr:

docker run -p 3000:3000 ghcr.io/ivanfioravanti/chatbot-ollama:main

Running Locally

1. Clone Repo

git clone https://github.com/ivanfioravanti/chatbot-ollama.git

2. Move to folder

cd chatbot-ollama

3. Install Dependencies

npm ci

4. Run Ollama server

Either via the cli:

ollama serve

or via the desktop client

5. Run App

npm run dev

6. Use It

You should be able to start chatting.

Tips

  • Attach documents via the paper icon in the composer — the content is included for the model invisibly so the chat stays uncluttered.
  • Attach an image with the camera icon — vision models will “see” it; others will ignore it.
  • Use the clipboard icon in the sticky header to copy the current conversation.

Configuration

When deploying the application, the following environment variables can be set:

Environment Variable Default value Description
DEFAULT_MODEL mistral:latest The default model to use on new conversations
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT see here The default system prompt to use on new conversations
NEXT_PUBLIC_DEFAULT_TEMPERATURE 1 The default temperature to use on new conversations

Contact

If you have any questions, feel free to reach out to me on X.

Extension points exported contracts — how you extend this code

OllamaModel (Interface)
(no doc)
types/ollama.ts
Prompt (Interface)
(no doc)
types/prompt.ts
ErrorMessage (Interface)
(no doc)
types/error.ts
LocalStorage (Interface)
(no doc)
types/storage.ts
KeyValuePair (Interface)
(no doc)
types/data.ts
ConversationV1 (Interface)
(no doc)
types/export.ts
ProcessEnv (Interface)
(no doc)
types/env.ts
Message (Interface)
(no doc)
types/chat.ts

Core symbols most depended-on inside this repo

handleUpdateConversation
called by 8
pages/api/home/home.tsx
handleSend
called by 7
components/Chat/ChatInput.tsx
saveConversation
called by 6
utils/app/conversation.ts
saveConversations
called by 6
utils/app/conversation.ts
savePrompts
called by 5
utils/app/prompts.ts
handleFetch
called by 5
hooks/useFetch.ts
cleanData
called by 4
utils/app/importExport.ts
saveFolders
called by 4
utils/app/folders.ts

Shape

Function 178
Interface 60
Class 2
Enum 1
Method 1

Languages

TypeScript100%

Modules by API surface

components/Chat/ChatInput.tsx15 symbols
components/Chat/ChatMessage.tsx11 symbols
pages/api/home/home.tsx9 symbols
components/Chatbar/components/Conversation.tsx9 symbols
components/Chat/SystemPrompt.tsx9 symbols
utils/app/importExport.ts8 symbols
components/Folder/Folder.tsx8 symbols
components/Promptbar/components/Prompt.tsx7 symbols
components/Chatbar/Chatbar.tsx7 symbols
components/Chat/Chat.tsx7 symbols
utils/app/pdf.ts6 symbols
components/Promptbar/Promptbar.tsx6 symbols

Dependencies from manifests, versioned

@dqbd/tiktoken1.0.2 · 1×
@tabler/icons-react3.31.0 · 1×
@tailwindcss/typography0.5.9 · 1×
@tanstack/react-query5.26.0 · 1×
@types/jsdom21.1.1 · 1×
@types/node22.12.0 · 1×
@types/react19.0.11 · 1×
@types/react-dom19.0.4 · 1×
@types/uuid9.0.1 · 1×

For agents

$ claude mcp add chatbot-ollama \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact