{"id":21044379,"url":"https://github.com/gsudiro/chatbot-ollama","last_synced_at":"2025-03-13T22:09:59.596Z","repository":{"id":263342545,"uuid":"890079521","full_name":"gsudiro/Chatbot-Ollama","owner":"gsudiro","description":"Simple chatbot with Ollama","archived":false,"fork":false,"pushed_at":"2025-03-06T03:29:56.000Z","size":37380,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T04:26:23.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/gsudiro.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":"2024-11-18T00:06:41.000Z","updated_at":"2025-03-06T03:29:59.000Z","dependencies_parsed_at":"2025-02-25T05:25:20.238Z","dependency_job_id":"e31be108-5904-4cc0-a7ad-117c819fc59b","html_url":"https://github.com/gsudiro/Chatbot-Ollama","commit_stats":null,"previous_names":["gsudiro/chatbot","gsudiro/chatbot-ollama"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsudiro%2FChatbot-Ollama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsudiro%2FChatbot-Ollama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsudiro%2FChatbot-Ollama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsudiro%2FChatbot-Ollama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsudiro","download_url":"https://codeload.github.com/gsudiro/Chatbot-Ollama/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489898,"owners_count":20299001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-19T14:16:34.858Z","updated_at":"2025-03-13T22:09:59.578Z","avatar_url":"https://github.com/gsudiro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Chatbot with Ollama Integration\n\nA modern, desktop-based AI chatbot application that integrates with Ollama to provide a user-friendly interface for interacting with LLM models. Built with Python and CustomTkinter for a clean, modern look.\n\n![Chatbot Interface Placeholder](imgs/img.png)\n\n## Features\n\n- 🤖 Integrated with Ollama LLM models\n- 🎨 Modern dark-mode GUI using CustomTkinter\n- 💬 Real-time chat interface\n- 🔄 Automatic Ollama service management\n- 📊 Model management and storage information\n- 💾 Automatic model downloading\n- 🧵 Multi-threaded for responsive UI\n- ⌨️ Support for keyboard shortcuts\n\n## Prerequisites\n\nBefore running the application, make sure you have:\n\n1. Python 3.8 or higher installed\n2. Ollama installed on your system ([Ollama Installation Guide](https://ollama.ai/download))\n3. Required Python packages\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/gsudiro/Chatbot-Ollama.git\ncd ai-chatbot\n```\n\n2. Create and activate a virtual environment (recommended):\n```bash\npython -m venv .venv\n# On Windows:\n.venv\\Scripts\\activate\n# On macOS/Linux:\nsource .venv/bin/activate\n```\n\n3. Install required packages:\n```bash\npip install customtkinter requests langchain-core langchain-ollama\n# Or\npip install -r requirements.txt\n```\n\n## Usage\n\n1. Start the application:\n```bash\npython main.py\n```\n\n2. The application will:\n   - Automatically start Ollama service if not running\n   - Check for and download required models\n   - Initialize the chat interface\n\n3. Features:\n   - Type messages in the input field and press Enter or click Send\n   - Click \"Show Models\" to view installed models and storage usage\n   - Watch real-time status updates in the status bar\n\n## Model Storage Locations\n\nThe models are stored by Ollama in the following locations:\n\n- Linux: `/usr/share/ollama/models`\n- macOS: `$HOME/.ollama/models`\n- Windows: `C:\\Users\\%username%\\.ollama\\models`\n\n## Technical Details\n\n### Components\n\n- **GUI**: Built with CustomTkinter for a modern look\n- **LLM Integration**: Uses Langchain and Ollama\n- **Threading**: Separate threads for UI and model operations\n- **Error Handling**: Comprehensive error catching and user feedback\n\n### Architecture\n\n```\nchatbot.py\n├── ChatbotGUI (Main Class)\n│   ├── UI Components\n│   │   ├── Chat Display\n│   │   ├── Input Field\n│   │   ├── Send Button\n│   │   └── Model Info Button\n│   ├── Ollama Management\n│   │   ├── Service Control\n│   │   ├── Model Management\n│   │   └── Status Updates\n│   └── Chat Processing\n       ├── Message Handling\n       ├── Context Management\n       └── Response Generation\n```\n\n## Key Methods\n\n- `initialize_chatbot()`: Sets up Ollama and model\n- `send_message()`: Handles message processing\n- `list_installed_models()`: Shows model information\n- `pull_model()`: Downloads required models\n- `update_status()`: Updates UI status\n- `add_message()`: Adds messages to chat display\n\n## Contributing\n\nFeel free to submit issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- [Ollama](https://ollama.ai/) for the LLM backend\n- [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter) for the modern UI\n- [Langchain](https://www.langchain.com/) for the LLM integration framework","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsudiro%2Fchatbot-ollama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsudiro%2Fchatbot-ollama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsudiro%2Fchatbot-ollama/lists"}