{"id":22876945,"url":"https://github.com/adelelawady/qwenchat","last_synced_at":"2026-03-09T08:02:24.228Z","repository":{"id":265560990,"uuid":"896259982","full_name":"adelelawady/QwenChat","owner":"adelelawady","description":"This project is a React-based chat application powered by Qwen-Coder, designed to assist developers with writing, debugging, and improving code. The application functions like ChatGPT but is tailored specifically for coding needs","archived":false,"fork":false,"pushed_at":"2024-11-29T23:07:05.000Z","size":473,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T19:50:27.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/adelelawady.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-29T22:40:01.000Z","updated_at":"2025-01-17T15:01:00.000Z","dependencies_parsed_at":"2024-11-29T23:37:09.479Z","dependency_job_id":null,"html_url":"https://github.com/adelelawady/QwenChat","commit_stats":null,"previous_names":["adelelawady/qwenchat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adelelawady/QwenChat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2FQwenChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2FQwenChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2FQwenChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2FQwenChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adelelawady","download_url":"https://codeload.github.com/adelelawady/QwenChat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2FQwenChat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30287447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-12-13T15:28:27.950Z","updated_at":"2026-03-09T08:02:24.205Z","avatar_url":"https://github.com/adelelawady.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat with Qwen-Coder\n\nA real-time chat application that allows users to interact with Qwen-Coder AI model, featuring file upload capabilities and chat history. Built with React, FastAPI, and Ollama.\n\n![Screenshot 2024-11-30 005033](https://github.com/user-attachments/assets/295417dd-d4e1-414a-82dc-a7fbaf11be44)\n\n\n## Features\n\n- Real-time chat with Qwen-Coder\n- File upload and analysis\n- Chat history persistence\n- Code syntax highlighting\n- Markdown support\n- File content analysis\n- Modern UI inspired by ChatGPT\n\n## Prerequisites\n\n- Node.js (v16 or higher)\n- Python (3.8 or higher)\n- Ollama installed on your system\n\n\n### Installing Ollama and Qwen-Coder\n\n1. Install Ollama:\n\n    **On macOS or Linux:**\n    ```bash\n    curl -fsSL https://ollama.com/install.sh | sh\n    ```\n\n    **On Windows:**\n    - Download and install from [Ollama Windows](https://ollama.com/download/windows)\n    - Make sure Windows Subsystem for Linux (WSL) is installed\n    - Follow the installation wizard instructions\n\n2. Start Ollama service:\n    ```bash\n    ollama serve\n    ```\n\n3. Pull the Qwen-Coder model (in a new terminal):\n    ```bash\n    # Pull the smallest version (recommended for most users)\n    ollama pull qwen2.5-coder:0.5b\n    ```\n\n    The download might take a few minutes depending on your internet connection. You'll see a progress bar like this:\n    ```\n    pulling manifest... done\n    pulling 6c91e4... done\n    pulling 4c915e... done\n    verifying sha256 digest... done\n    ```\n\n4. Test the model installation:\n    ```bash\n    ollama run qwen2.5-coder:0.5b \"Hello, are you ready?\"\n    ```\n    You should get a response from the model.\n\n**Troubleshooting Ollama Installation:**\n\n- If you get permission errors on Linux:\n    ```bash\n    sudo chmod +x /usr/local/bin/ollama\n    ```\n\n- If Ollama service fails to start:\n    ```bash\n    # Check if the service is running\n    ps aux | grep ollama\n    \n    # Restart the service\n    killall ollama\n    ollama serve\n    ```\n\n\n## Installation\n\n### Backend Setup\n\n1. Create a Python virtual environment:\n\n    ```\n    python -m venv venv\n    source venv/bin/activate # On Windows: venv\\Scripts\\activate\n    ```\n\n2. Install Python dependencies:\n    ```\n    pip install fastapi uvicorn langchain langchain-community python-multipart\n    ```\n\n3. Create required directories:\n    ```\n    mkdir uploads\n    ```\n\n### Frontend Setup\n\n1. Install Node.js dependencies:\n    ```\n    npm install\n    ```\n\nRequired dependencies include:\n- @tanstack/react-query\n- axios\n- react-markdown\n- react-syntax-highlighter\n- lucide-react\n- tailwindcss\n- @tailwindcss/typography\n- shadcn/ui components\n\n## Running the Application\n\n1. Start Ollama (if not already running):\n    ```\n    ollama start\n    ```\n\n2. Start the backend server (from the project root):\n    ```\n    uvicorn backend.server:app --reload\n    ```\n\n3. Start the frontend development server (in a new terminal):\n    ```\n    npm run dev\n    ```\n\n4. Open your browser and navigate to:\n    ```\n    http://localhost:5173\n    ```\n\n\n## Project Structure\n\n```\n    project/\n├── backend/\n│ ├── init.py\n│ ├── server.py # FastAPI server\n│ ├── chat_with_qwen.py # Qwen integration\n│ └── chat_history.py # Chat history management\n├── src/\n│ ├── components/ # React components\n│ │ ├── Chat.tsx\n│ │ ├── ChatInput.tsx\n│ │ ├── ChatMessage.tsx\n│ │ ├── ChatSidebar.tsx\n│ │ └── FileUpload.tsx\n│ └── pages/\n│ └── Index.tsx\n└── uploads/ # Uploaded files directory\n```\n\n\n## Qwen-Coder Models\n\nAvailable models through Ollama:\n\n\n| Model | Size | RAM Required | Performance |\n|-------|------|--------------|-------------|\n| qwen2.5-coder:0.5b | 500MB | 2GB | Fast, good for basic tasks |\n| qwen2.5-coder:1.8b | 1.8GB | 4GB | Better comprehension |\n| qwen2.5-coder:3b | 3GB | 8GB | Best quality, slower |\n\n\nTo change models, update the model name in `backend/chat_with_qwen.py`:\n```\nmodel = Ollama(\n    model=\"qwen2.5-coder:0.5b\",\n    base_url=\"http://localhost:11434\",\n    temperature=0.7,  # Add some creativity for analysis\n)\n```\n\n\n## Features in Detail\n\n### File Upload\n- Supports text files, code files, and other formats\n- Automatic content extraction\n- File content analysis by Qwen-Coder\n\n### Chat Interface\n- Real-time message streaming\n- Code syntax highlighting\n- Markdown rendering\n- File upload indicator\n- Typing indicators\n\n### Chat History\n- Persistent chat storage\n- Multiple chat sessions\n- Chat title generation\n- Delete chat functionality\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a new Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelelawady%2Fqwenchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadelelawady%2Fqwenchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelelawady%2Fqwenchat/lists"}