{"id":30062550,"url":"https://github.com/kangphp/electron-deepseek","last_synced_at":"2025-08-08T03:37:34.986Z","repository":{"id":305531558,"uuid":"1023126509","full_name":"kangphp/electron-deepseek","owner":"kangphp","description":"ElecDeep is a simple Electron-based desktop chat application for interacting with locally-run AI models via an OpenAI-compatible API server (e.g., LM Studio). It provides a minimalist interface to send messages and receive real-time responses.","archived":false,"fork":false,"pushed_at":"2025-07-20T15:47:01.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T17:38:53.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kangphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-20T15:27:21.000Z","updated_at":"2025-07-20T15:47:04.000Z","dependencies_parsed_at":"2025-07-20T17:49:52.437Z","dependency_job_id":null,"html_url":"https://github.com/kangphp/electron-deepseek","commit_stats":null,"previous_names":["kangphp/electron-deepseek"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kangphp/electron-deepseek","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kangphp%2Felectron-deepseek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kangphp%2Felectron-deepseek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kangphp%2Felectron-deepseek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kangphp%2Felectron-deepseek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kangphp","download_url":"https://codeload.github.com/kangphp/electron-deepseek/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kangphp%2Felectron-deepseek/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269360835,"owners_count":24404295,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":[],"created_at":"2025-08-08T03:37:34.503Z","updated_at":"2025-08-08T03:37:34.968Z","avatar_url":"https://github.com/kangphp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ElecDeep - Desktop Chat with Local AI\n\nElecDeep is a simple desktop chat application built with [Electron](https://www.electronjs.org/). It serves as an interface to interact with a locally run AI model (like DeepSeek) through a server that provides an OpenAI-compatible API endpoint, such as [LM Studio](https://lmstudio.ai/).\n\n![ElecDeep Application Interface](assets/app-screenshot.png)\n\n## Features\n\n* **Simple Chat Interface**: A clean and easy-to-use interface for communicating with the AI.\n* **Local Connection**: Connects to a local AI server (default: `http://localhost:1234`), ensuring privacy and full control.\n* **Typing Indicator**: Informs the user when the AI is processing and generating a response.\n* **Error Handling**: Displays an error message if there's a problem contacting the AI server.\n* **Buildable**: Easy to package into a portable desktop application for Windows using `electron-builder`.\n\n## Tech Stack\n\n* [Electron](https://www.electronjs.org/) as the desktop application framework.\n* [Node.js](https://nodejs.org/) for the backend process.\n* [OpenAI Node.js Library](https://github.com/openai/openai-node) for interacting with the API.\n* HTML, CSS, and Vanilla JavaScript for the user interface.\n\n## Prerequisites\n\nBefore running this application, ensure you have:\n1.  **Node.js and npm**: [Download and install Node.js](https://nodejs.org/en).\n2.  **A Local AI Server**: An application like [LM Studio](https://lmstudio.ai/), [Jan](https://jan.ai/), or [Ollama](https://ollama.com/) installed and running.\n3.  **An AI Model**: Download and run a compatible model (e.g., `deepseek-r1-distill-qwen-1.5b`) on your local AI server.\n\n## Installation and Running\n\n1.  **Clone this repository:**\n    ```bash\n    git clone [https://github.com/kangphp/electron-deepseek.git](https://github.com/kangphp/electron-deepseek.git)\n    cd electron-deepseek\n    ```\n\n2.  **Install dependencies:**\n    ```bash\n    npm install\n    ```\n\n3.  **Run Your Local AI Server:**\n    * Make sure the server is running and provides an OpenAI-compatible API at `http://localhost:1234/v1`.\n    * Ensure the model you want to use is loaded on the server.\n\n4.  **Run the Electron application:**\n    ```bash\n    npm start\n    ```\n\n## Building the Application\n\nTo create a portable executable file (`.exe`) for Windows, run the following command:\n\n```bash\nnpm run build\n```\n\nThe build output will be available in the dist folder.\n\n## Configuration\nYou can change the connection settings for the AI server in the main.js file:\n\n* Server URL: Change the baseURL value in the client object.\n* Model Name: Change the model value in the handleChatCompletion function.\n* Other Parameters: You can adjust temperature, max_tokens, and other parameters as needed.\n\n```JavaScript\n// main.js\n\n// OpenAI client configuration\nconst client = new OpenAI({\n  baseURL: 'http://localhost:1234/v1', // \u003c-- Change the URL here\n  apiKey: 'no-key-required',\n  // ...\n});\n\n// ...\n\nasync function handleChatCompletion(message) {\n  // ...\n  const completion = await client.chat.completions.create({\n    model: 'deepseek-r1-distill-qwen-1.5b', // \u003c-- Change the model name here\n    messages: [\n      // ...\n    ],\n    temperature: 0.7, // \u003c-- Change parameters here\n    max_tokens: 1024,\n    // ...\n  });\n  // ...\n}\n```\n\n## Project Structure\n* main.js: The main file for the Electron main process. Manages the application window and handles backend logic (AI connection).\n* index.html: The HTML structure and CSS styling for the chat interface. Also contains the renderer process logic to handle user interaction.\n* preload.js: A script that securely bridges the Electron main process and the renderer process.\n* package.json: Defines project dependencies, scripts, and metadata.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkangphp%2Felectron-deepseek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkangphp%2Felectron-deepseek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkangphp%2Felectron-deepseek/lists"}