{"id":24970221,"url":"https://github.com/clchinkc/streamlit-editor","last_synced_at":"2025-05-13T15:39:46.344Z","repository":{"id":275444537,"uuid":"922078285","full_name":"clchinkc/streamlit-editor","owner":"clchinkc","description":"Personal project, Generative AI, Streamlit, Python","archived":false,"fork":false,"pushed_at":"2025-02-16T15:25:12.000Z","size":35321,"stargazers_count":51,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T03:34:48.209Z","etag":null,"topics":["generative-ai","python","streamlit","streamlit-application"],"latest_commit_sha":null,"homepage":"https://doc-editor.streamlit.app","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/clchinkc.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-01-25T08:59:37.000Z","updated_at":"2025-03-24T06:09:08.000Z","dependencies_parsed_at":"2025-02-02T16:28:45.528Z","dependency_job_id":null,"html_url":"https://github.com/clchinkc/streamlit-editor","commit_stats":null,"previous_names":["clchinkc/streamlit-editor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clchinkc%2Fstreamlit-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clchinkc%2Fstreamlit-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clchinkc%2Fstreamlit-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clchinkc%2Fstreamlit-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clchinkc","download_url":"https://codeload.github.com/clchinkc/streamlit-editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248348307,"owners_count":21088846,"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":["generative-ai","python","streamlit","streamlit-application"],"created_at":"2025-02-03T15:56:39.491Z","updated_at":"2025-05-13T15:39:46.321Z","avatar_url":"https://github.com/clchinkc.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# LLM-Powered Document Editor: DSPy \u0026 LangChain Integration for Intelligent Writing (OpenRouter/OpenAI/Deepseek/Gemini/Github/Ollama)\n\n[![X URL](https://img.shields.io/twitter/url/https/x.com/firstoryapp.svg?style=social\u0026label=Follow%20%40firstoryapp)](https://x.com/firstoryapp)\n[![Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://doc-editor.streamlit.app)\n\n**An intelligent writing assistant with multi-LLM integration for enhanced content creation and editing.**\n\n[![App Screen Recording](https://github.com/user-attachments/assets/9adbdbc6-2138-4d63-8e0e-83dd8cb03d7f)](https://github.com/user-attachments/assets/f37c4dd5-423c-4406-a08d-51f67942ac7b)\n\nLeverage DSPy's LLM orchestration and LangChain's document processing to create, refine, and manage content with unprecedented efficiency. Ideal for technical writers, content creators, and knowledge workers seeking intelligent document editing.\n\n## 📚 Table of Contents\n- [LLM-Powered Document Editor: DSPy \\\u0026 LangChain Integration for Intelligent Writing (OpenRouter/OpenAI/Deepseek/Gemini/Github/Ollama)](#llm-powered-document-editor-dspy--langchain-integration-for-intelligent-writing-openrouteropenaideepseekgeminigithubollama)\n  - [📚 Table of Contents](#-table-of-contents)\n  - [🚀 Quick Start](#-quick-start)\n  - [✨ Intelligent Document Workflows](#-intelligent-document-workflows)\n    - [1. Content Creation Phase](#1-content-creation-phase)\n    - [2. AI Collaboration Phase](#2-ai-collaboration-phase)\n    - [3. Finalization \\\u0026 Management](#3-finalization--management)\n  - [⚙️ System Architecture](#️-system-architecture)\n  - [🔧 Technical Stack](#-technical-stack)\n  - [📄 License](#-license)\n\n## 🚀 Quick Start\n\nTry the live demo immediately:\n[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://doc-editor.streamlit.app)\n\n1. Clone repository:\n```\ngit clone https://github.com/clchinkc/streamlit-editor.git\npython -m venv venv\nsource venv/bin/activate  # Unix/MacOS\n# .\\venv\\Scripts\\activate  # Windows\n```\n\n2. Install dependencies:\n```\npip install -r requirements.txt\n```\n\n3. Configure Streamlit secrets:\n```bash\nmkdir -p .streamlit\ntouch .streamlit/secrets.toml\n```\n\nAdd the following to `.streamlit/secrets.toml`:\n```toml\n# API Keys (at least one required)\n[openrouter]\nOPENROUTER_API_KEY = \"your_openrouter_api_key\"\nOPENROUTER_MODEL = \"your_openrouter_model\"\n\n[openai]\nOPENAI_API_KEY = \"your_openai_api_key\"\n\n[deepseek]\nDEEPSEEK_API_KEY = \"your_deepseek_api_key\"\n\n[gemini]\nGEMINI_API_KEY = \"your_gemini_api_key\"\n\n[github]\nGITHUB_TOKEN = \"your_github_token\"\n\n[ollama]\nOLLAMA_MODEL = \"your_ollama_model\"\n```\n\n4. (If you want to use Ollama) Setup Ollama:\n\nFirst, install [Ollama](https://ollama.com/download).\n\nThen start Ollama server with the specified model:\n```\nollama run your_ollama_model\n```\n\n5. Launch application:\n```\nstreamlit run streamlit_editor.py\n```\nAnd the app will be running on http://localhost:8501.\n\n## ✨ Intelligent Document Workflows\n\n**Combined Features \u0026 User Processes**\n\n### 1. Content Creation Phase\n- **Multi-format Editing Suite**\n  - ✍️ Dual-mode editor (Editor + Markdown Preview)\n  - 📥 File ingestion: Drag-and-drop `.md`/`.txt` support\n  - 📤 Export flexibility: Download markdown or clipboard copy\n  \n- **Structural Tools**\n  - 🗂️ LangChain-powered document chunking\n  - 📚 Section-level editing\n\n### 2. AI Collaboration Phase\n- **Context-Aware Assistance**\n  - 🤖 DSPy-powered feedback suggestions (general or specific to reference text)\n  - 📑 Automated section summarization\n  - 🧩 LLM-driven content regeneration\n  - 📝 Review and compare AI-generated changes\n\n- **Quality Control**\n  - 🔍 Semantic feedback tracking with source references\n  - 📊 Real-time feedback dashboard\n  - ✅ Accept/reject AI suggestions with diff view\n\n### 3. Finalization \u0026 Management\n- **Output Optimization**\n  - 🧮 Batch operation processing for bulk edits\n\n- **Advanced Orchestration**\n  - 🚦 DSPy-managed suggestion pipeline\n  - 📜 Version history tracking\n  - 🌐 Multi-modal previews (raw + rendered views)\n  - 📄 Pagination for summaries\n\n## ⚙️ System Architecture\n\n[![](https://mermaid.ink/img/pako:eNqdVV1r2zAU_SvCpWODmGUrpKkfBknsjMEKZW4oDL8o9o0tYusaSW4a2v73XVv-iLvuYdGTPu45urrnSHp2YkzA8Zxdjoc448qwez-SjNrlJbvlQrIVFiVKkEbb-Y0G9TFydtzbcbeiAXtQwoCKnE82IEiEwSEEaMhCo4AXOfU2P_rAB1R7XfIY-tiEG77lGoYlQnIDPcQP74599FbV-dVT7E5hDFrjkMVPLtNVRgF9eC7kfphmYUnpnOa9Bki2PN73gBiLoj53v8LCozZQ9IiwKgquhoR2IgeX56ZbYIFMhRyyD55KVGY4LR5kjjxp59ktJlVuo3sJViglxEagPCk_c91vLx0LVwoPrhJpZqwS-nOtgI6cl1aKU1lGUM0fgS0qg01PM4M1qK_9G5XGUPIKsHvaNgXV7NXo8GEo8BsZRui4Mrb-tCc8GfYoeE3Rlm2QegQqeCpi9h0kKLJEs2cnzFjAEaqSCbJNmXSQN6frlBplh-WRfIfqXcQ_6nGUMfsFO8Jk8Fft38c0dgGrvbWA7iphhyc-CM2R_JuygzAZOxBdfWFdXUIsdlSVGHNUrUM0hUInN-2Rexc30yC4mU60UbgH7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S94qnjRz5Zc_kYcxtD49tb-Ss3n9PoHw9cvYQ)\n\n## 🔧 Technical Stack\n\n| Component       | Technology        | Purpose                    |\n|----------------|-------------------|----------------------------|\n| AI Framework   | DSPy             | LLM operations management  |\n| Text Processing| LangChain        | Document chunking          |\n| UI Framework   | Streamlit        | Web interface              |\n| Visualization  | Streamlit Mermaid| Document flow diagrams     |\n\n## 📄 License\n\nMIT Licensed - See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclchinkc%2Fstreamlit-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclchinkc%2Fstreamlit-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclchinkc%2Fstreamlit-editor/lists"}