Skip to main content

自动解析微信窗口的聊天内容,结合AI大模型,生成回复建议。

Project description

wechat-copilot

自动解析微信窗口的聊天内容,结合 AI 大模型,生成回复建议。

演示

快速安装

pip install wechat-copilot

配置

  1. 创建配置文件:
mkdir -p ~/.wechat-copilot
touch ~/.wechat-copilot/config.env
  1. 编辑配置文件 ~/.wechat-copilot/config.env:
# 必填:OpenAI API密钥
OPENAI_API_KEY=your_key_here

# 可选:OpenAI API地址(默认为 https://api.openai.com/v1)
OPENAI_BASE_URL=https://api.openai.com/v1

# 可选:快捷键设置(默认为 cmd+shift+space)
SHORTCUT=cmd+shift+space

使用方法

  1. 运行助手:
wechat-copilot
  1. 打开微信聊天窗口
  2. 快捷键:cmd+shift+space 触发
  3. GPT 会根据聊天内容生成回复建议,以系统通知的方式展示,自动复制到剪贴板
  4. 粘贴文本到聊天框,自行决定二次编辑

开发者指南

如果你想参与开发:

git clone https://github.com/yourusername/wechat-copilot.git
cd wechat-copilot
pip install -e ".[dev]"

核心思路

  1. 使用 pyobjc 获取微信窗口的聊天内容
  2. 使用 openai 的 API 生成回复建议
  3. 使用 osascript 生成系统通知
  4. 使用 pyperclip 自动复制到剪贴板

喜欢的话,可以点个 ��star🌟 支持一下。感谢感谢。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wechat_copilot-0.0.1.tar.gz (8.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wechat_copilot-0.0.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file wechat_copilot-0.0.1.tar.gz.

File metadata

  • Download URL: wechat_copilot-0.0.1.tar.gz
  • Upload date:
  • Size: 8.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for wechat_copilot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ba2fa48a581d36c49dc23b2802569a53cbeb4a1981d4b10d4645f0e852a00cd9
MD5 293e87dc2c67b7b81a9fa9e63af50a77
BLAKE2b-256 911c6ab75fe5500c837a43e3ff1839753b1a64d8e836492fe1cd874eb8dda79f

See more details on using hashes here.

File details

Details for the file wechat_copilot-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: wechat_copilot-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for wechat_copilot-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d69f89a173d92daa5b79d715fdd58e71f4b0d441e9157a55247e3f7410e8ec22
MD5 b0e0b5f030997cbacf0266d175eccc3e
BLAKE2b-256 2ab518ce73e07a7af3f755c8da697e9ed793e80d5bd0f320383527f60be34039

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page