慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
吾复吾之私人AI助手——今已为Windows隐私优先之Telegram机器人
Sreedhara Murthy · 2026-05-24 · via DEV Community

此乃投于GitHub速成大赛之作品


所筑之物

数字秘书者,乃以隐私为先之个人AI辅佐,运行于汝之Windows机,以Telegram与汝交谈。无需云服务订阅。无需Docker。除非汝自择,否则数据不逸汝机。

尔发讯,而机处之,乃得智应,知忆之答。声入声出。文件,网搜,备忘,OCR——皆Telegram之能也。

GitHub: github.com/sree1959git/Digital-Secretary


演示

设置向导

互动向导,不逾三刻:

  ____  _       _ _        _   ____                    _
 |  _ \(_) __ _(_) |_ __ _| | / ___|  ___  ___ _ __ ___| |_ __ _ _ __ _   _
 | | | | |/ _` | | __/ _` | | \___ \ / _ \/ __| '__/ _ \ __/ _` | '__| | | |
 | |_| | | (_| | | || (_| | |  ___) |  __/ (__| | |  __/ || (_| | |  | |_| |
 |____/|_|\__, |_|\__\__,_|_| |____/ \___|\___| _|  \___|  \__\__,_|_|   \__, |
          |___/                                                              |___/

  Your personal AI secretary. On Telegram. On Windows.

  Step 1: Telegram Bot Token
  Step 2: OpenRouter API Key
  Step 3: Default AI Model
  Step 4: Name Your AI Secretary
  Step 5: Personality

入全景模式 退出全屏模式

智能体在行动

You: Remind me to call the dentist tomorrow at 10am
Digital Secretary: Done! I've set a reminder for tomorrow at 10:00 AM: "Call the dentist". 
                   I'll message you here on Telegram when it's time.

You: [sends photo of whiteboard]
Digital Secretary: I can see a whiteboard with what appears to be a sprint plan. 
                   The items listed are: [extracted text from OCR + vision analysis]

You: [voice message] "What did we discuss last week about the project?"
Digital Secretary: [voice reply] Based on our previous conversations, we talked about...

进入全屏模式 退出全屏模式

架构一览

Telegram (Your Phone)
        │
        ▼
Digital Secretary (Windows PC)
        │
        ├── 🧠 AI: OpenRouter / Ollama / llama.cpp
        ├── 💾 Memory: SQLite FTS5 (persistent, searchable)
        ├── 🛠️ Tools: files, shell, web, OCR, MCP servers
        ├── 📅 Scheduler: APScheduler-backed reminders
        ├── 🎙️ STT: faster-whisper (local Whisper)
        └── 🔊 TTS: edge-tts (Microsoft neural voices)

进入全屏模式 退出全屏模式


复兴之志

起源之地(昔时)

约半年前,吾成此项目初版——时名解药— 乃为周末之试。其意简矣:吾欲得一人形之智囊,以助己。

  1. 无需月度订阅
  2. 吾于Windows之机中运行
  3. 已用 Telegram(吾手机中已有之)

三日得成原型。然世事纷扰,遂搁置之。其物虽可用,然粗疏不堪:

  • 配置中硬编码之路径 (C:/Users/Sreedhar/...) 深藏其中:
  • 此器虽能应问,然重启则忘前事:
  • 竟无语音之助:
  • 一Python之单文件,渐长至千行。
  • 无文牍——吾甚至忘己何以设之

吾于CODE_REVIEW_REPORT.md中,尽录此暴诚之事

"配置之牍,硬嵌私径...存忆惟在会间...OcrImageTool虽注于Telegram之驿,然未列于主器之录...自启之务,名号于wizard.py与autostart.py间,致有不协..."

吾所更易 (其后)

吾重拾此任以应此挑战,视之若初至客户代码库。其变者,如是:

建築之進益:

  • 析巨石为适制之包构:agent/channels/memory/providers/security/tools/
  • MemoryStore以SQLite FTS5——今此機已能記憶君於異會
  • ContextBuilder以集系統之詔於身分之文(SOUL.mdAGENTS.mdUSER.md)
  • 立正ToolRegistry於OpenAI相容之義

增新制

  • 🎙️音声输入输出 — 低语(本地语音识别)+ 边缘-TTS神经音(三级音系)
  • 📅 日程表 — "每日三时,令吾起而舒展"
  • 🖼️ 视觉+文字识别 — 发送图像,得文析而图述
  • 🔌 MCP桥接 — 任意接入模型语境协议服务器
  • 🔐 硬件绑定加密 — 密钥存于Fernet,系Windows UUID所钥

生活之适:

  • 交互式设置向导(无需手调JSON)
  • 依Windows任务调度器自启
  • Ctrl+C/SIGTERM之优雅停机
  • 分答于段界(无更多词中Telegram截断)
  • /model命以易AI模型于会话中

更名:

  • AntidoteDigital Secretary——新名更合其实:非徒“AI”而已,实乃尔之私人秘书也
  • 新CLI:digital_secretarydigital_secretary setup

吾与 GitHub Copilot 之经历

GitHub Copilot (经 Antigravity IDE) 于吾之复兴,诚为至宝。今列其助吾最巨之时刻:

1. 声音管道之设计

三层声音响应之系统,乃最难之设计之题:

  • 第一层:"读之出声" → 仅播最后之响应,不呼 LLM 之助
  • 二级:释此→大语言模型以自然言语再释之
  • 三级:默认语音查询→大语言模型为言语作要旨

吾以英文述其事,Copilot助绘状态机,且撰初稿_is_readout_request()_is_explain_request() 之模式相合。本需经时思量边际之变者,片刻间草拟而成。

2. 硬件约束之加密

# Copilot suggested this elegant approach for Windows-specific key derivation
def _derive_key(uuid_bytes: bytes) -> bytes:
    return hashlib.pbkdf2_hmac(
        "sha256",
        uuid_bytes,
        salt=b"digital_secretary_v1",
        iterations=480_000,
    )

入全屏模式 出全屏模式

悟当用PBKDF2以高迭代而非原初HMAC,且依OWASP于2024年之建议,示以具体迭代数(480K)。

三. SQLite FTS5 内存检索

吾未尝用 FTS5。Copilot 撰制架构迁转,撰 MATCH 查询,并释 何以 rank 需要否定,以正关联排序。吾于其间得新知.

四. Windows 信号处理之弊

# This pattern only works on Unix:
loop.add_signal_handler(signal.SIGTERM, callback)

# Copilot caught this and suggested the Windows-compatible approach:
signal.signal(signal.SIGTERM, _signal_handler)

入全景模式 退出全屏模式

于代码检视中见平台不兼容之事——此乃用户报之而后知也.


用例

数字秘书者,为欲得私人AI之人设也:

场景 汝所为 其所为
私人助手 "添牛乳于吾购物之列" 存于记忆,俟汝询之则取
日课要览 定朝八时之讯 寄汝提醒与笔记之要
文牍阅者 送PDF之影 识字加智囊之要
码助之师 贴谬误,询其正之方 搜览网络,阅察文书,献策解难
会议笔记 记录要言之钥 录而存之
家事秘书 共记之提醒 为全家成员安排任务
研究助理 寻近时之文于X 网络搜求兼撮要
离线之智 本地llama.cpp之设 无云无网所需

技术架构之要旨

持久之忆

# Search semantic memory with FTS5
results = await memory.search("dentist appointment", limit=5)
# Returns: [Memory(content="User mentioned dentist on Tuesday...", category="fact")]

入全景模式 出全景模式

凡言谈皆撮要而存之。后若询及相干之事,则相关之忆自注于系统之告,如流之入河。

工具之用显于行

若问"明日天色如何",则大语言模型:

  1. 决意而呼web_search("weather tomorrow [your city]")
  2. 得回响之果
  3. fetch_webpage(url)以询详报
  4. 合成自然之语

一气呵成于Telegram之交流

多源AI

# Switch between providers transparently
provider = get_provider()  # reads config, returns right provider

# All providers implement the same interface
response = await provider.chat(messages=messages, tools=tool_defs)

入全景模式 出全景模式

合OpenRouter(百以上模型)、Ollama(本地)、llama.cpp(超本地,GPU或CPU)之用


初试之始

git clone https://github.com/sree1959git/Digital-Secretary.git
cd Digital-Secretary
.\start.ps1

入全景模式 退出全屏模式

启动器统御一切——检校Python之版本,立虚拟环境,安插依存,启导引之仪

全备之指南:TELEGRAM_BOT_SETUP.md


何以继之

项目之略图诚陈未竟之事:

  • 多智能体之导引——别离/finance/health/work有分域之忆之次代理
  • 审批流程—— Telegram 内联按钮,以批准文件写入及 Shell 命令
  • 持久对话记录— 每转必持,非独要旨。
  • 网络界面— 一览往昔之忆,掌管备忘,切换车型

此挑战恰似吾所需之鞭策,使吾不再将此置诸架侧。

若试之,请于注脚以见其意。下视之


标签:#开发者挑战赛 #GitHub挑战赛 #Python #Telegram #人工智能 #Windows #开源软件