{"id":25800127,"url":"https://github.com/eternalflame02/ollama-chat-interface","last_synced_at":"2026-06-13T17:01:56.141Z","repository":{"id":279635213,"uuid":"939251381","full_name":"eternalflame02/Ollama-chat-interface","owner":"eternalflame02","description":"Ollama-chat-interface is a simple, lightweight interface built with Flask and Bootstrap 5 for interacting with offline language models via Ollama. It features code snippet detection, a collapsible \"thinking\" section using \u003cthink\u003e tags, and dark mode support, making it easy to view and copy code outputs while maintaining a modern, responsive design.","archived":false,"fork":false,"pushed_at":"2025-02-26T15:55:30.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T16:24:12.527Z","etag":null,"topics":["deepseek-r1-distill-qwen","ollama","ollama-interface","python-flask"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eternalflame02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T08:41:19.000Z","updated_at":"2025-02-26T15:55:34.000Z","dependencies_parsed_at":"2025-02-26T16:24:13.359Z","dependency_job_id":null,"html_url":"https://github.com/eternalflame02/Ollama-chat-interface","commit_stats":null,"previous_names":["eternalflame02/ollama-chat-interface"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eternalflame02/Ollama-chat-interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eternalflame02%2FOllama-chat-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eternalflame02%2FOllama-chat-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eternalflame02%2FOllama-chat-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eternalflame02%2FOllama-chat-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eternalflame02","download_url":"https://codeload.github.com/eternalflame02/Ollama-chat-interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eternalflame02%2FOllama-chat-interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34292326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepseek-r1-distill-qwen","ollama","ollama-interface","python-flask"],"created_at":"2025-02-27T15:58:52.515Z","updated_at":"2026-06-13T17:01:56.125Z","avatar_url":"https://github.com/eternalflame02.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ollama-chat-interface\n\n## Chatbot UI with Code Snippet Support, Dark Mode, and Ollama Integration\n\nA modern, dynamic chatbot UI built with Flask and Bootstrap 5. This interface supports code snippet detection and separation, dark mode, and a clean, responsive design—all integrated with [Ollama](https://ollama.com) to run offline language models.\n\n\u003e **Note:** Before using this interface, ensure you have Ollama installed and running on your machine (typically listening on `http://127.0.0.1:11434`). For more information, please refer to the [Ollama documentation](https://ollama.com).\n\n---\n\n## Features\n\n- **Modern UI:** Clean and responsive chat interface using Bootstrap 5.\n- **Dark Mode:** Toggle dark mode for a better visual experience.\n- **Code Snippet Parsing:** Automatically detects code blocks (formatted with triple backticks) and displays them in separate chat bubbles with copy buttons.\n- **Collapsible \"Thinking\" Section:** Use `\u003cthink\u003e` and `\u003c/think\u003e` tags in the bot's response to display internal reasoning separately in a collapsible block.\n- **Loading Indicator:** A spinner is shown while waiting for the chatbot's response.\n- **Ollama Integration:** Communicates with a locally running Ollama server to generate responses.\n- **Extensible:** A solid foundation to add more features like syntax highlighting, persistent chat history, and user authentication.\n\n---\n\n## Future Enhancements\n\n- **Syntax Highlighting:** Integrate libraries like PrismJS or Highlight.js for better code rendering.\n- **Persistent Chat History:** Save chat logs using local storage or a backend database.\n- **User Authentication:** Implement user accounts for personal chat histories.\n- **Real-time Updates:** Use WebSockets (e.g., Flask-SocketIO) for a more dynamic experience.\n- **Containerization:** Dockerize the application for easier deployment.\n\n---\n\n## Installation\n\n1. **Clone the Repository:**\n   ```bash\n   git clone https://github.com/eternalflame02/Ollama-chat-interface.git\n   cd Ollama-chat-interface\n   ```\n\n2. **Create and Activate a Virtual Environment:**\n   ```bash\n   python -m venv venv\n   # On Windows:\n   venv\\Scripts\\activate\n   # On macOS/Linux:\n   source venv/bin/activate\n   ```\n\n3. **Install Dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n   or \n   ```bash\n   pip install Flask==3.1.0 requests==2.32.3\n   ```\n\n4. **Ensure Ollama is Installed and Running:**\n   - Download and install Ollama from [https://ollama.com](https://ollama.com).\n   - Run the Ollama server:\n     ```bash\n     ollama serve\n     ```\n   - Ensure the desired model is available:\n     ```bash\n     ollama list\n     ```\n     The project now uses the `deepseek-r1:7b` model. Ensure it is downloaded and ready for use.\n\n5. **Run the Flask Application:**\n   ```bash\n   python app.py\n   ```\n   The application will be available at [http://127.0.0.1:5000](http://127.0.0.1:5000).\n\n---\n\n## Project Structure\n\n```\nOllama-chat-interface/\n├── app.py                   # Main Flask application\n├── templates/\n│   └── index.html           # HTML file containing the chatbot UI\n├── requirements.txt         # Python dependencies\n└── README.md                # Project README (this file)\n```\n\n---\n\n## Usage\n\n- Open your browser and navigate to [http://127.0.0.1:5000](http://127.0.0.1:5000).\n- Type a message in the chat input and press \"Send.\"\n- The chatbot supports:\n  - **Code Snippets:** Format your code with triple backticks (```) to display it in separate, copyable chat bubbles.\n  - **Thinking Section:** Wrap any internal reasoning or additional details between `\u003cthink\u003e` and `\u003c/think\u003e` tags. The content between these tags will appear in a collapsible block below the main answer.\n- Ensure that the Ollama server is running locally to generate responses from the chosen offline model.\n\n---\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit pull requests with your enhancements or bug fixes.\n\n---\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feternalflame02%2Follama-chat-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feternalflame02%2Follama-chat-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feternalflame02%2Follama-chat-interface/lists"}