Skip to main content

solveit_wxbot

solveit_wxbot 是一个将 Solveit 接入企业微信的 Webhook 服务。借助企业微信的「微信插件」功能,用户无需安装企业微信客户端,直接在个人微信中即可与 AI 对话。

Usage

Installation

Install latest from pypi

$ pip install solveit_wxbot

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on pypi respectively.

How to use

企业微信申请以及配置请选看相关章节openclaw接入个人微信

Configuration

启动前需将企业微信的凭据设置到环境变量。

import os

os.environ['WECOM_CORP_ID']  = 'ww1234567890abcdef'      # 企业 ID(在「我的企业」页面获取)
os.environ['WECOM_SECRET']   = 'your-app-secret'          # 自建应用的 Secret
os.environ['WECOM_AGENT_ID'] = '1000002'                   # 自建应用的 AgentId
os.environ['WECOM_TOKEN']    = 'your-callback-token'       # 接收消息 API 中设置的 Token
os.environ['WECOM_AES_KEY']  = 'your-43-char-encoding-aes-key'  # 接收消息 API 中设置的 EncodingAESKey

Quick start

配置完成后,导入模块并启动 Webhook 服务:

from solveit_wxbot.app import *
srv = start_bot()

如需停止服务,调用 stop_bot 并传入启动时返回的服务器对象:

stop_bot(srv)
INFO:     Started server process [6537]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [6537]

Deploy on Solveit

要让 bot 在 Solveit 实例启动时自动运行,在 AUTORUN 文件夹下创建一个 Dialog,添加以下两条代码消息并保存即可。Solveit 会在每次实例启动时自动执行 AUTORUN 中所有 Dialog 的代码消息。

第一条——设置环境变量并导入模块:

import os

os.environ['WECOM_CORP_ID']  = 'your-corp-id'
os.environ['WECOM_SECRET']   = 'your-secret'
os.environ['WECOM_AGENT_ID'] = 'your-agent-id'
os.environ['WECOM_TOKEN']    = 'your-token'
os.environ['WECOM_AES_KEY']  = 'your-aes-key'

from solveit_wxbot.app import *

第二条——启动服务:

srv = start_bot()

保存后,每次 Solveit 实例重启都会自动启动 WeChat bot。

Metadata

Release files for solveit-wxbot 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solveit-wxbot 0.0.2
File Size Uploaded Provenance Actions
solveit_wxbot-0.0.2.tar.gz 14.1 kB Without provenance Details for solveit_wxbot-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solveit-wxbot 0.0.2
File Interpreter ABI Platform Actions
solveit_wxbot-0.0.2-py3-none-any.whl Python 3 none any Details for solveit_wxbot-0.0.2-py3-none-any.whl

Total release size: 28.6 kB

Release files / solveit_wxbot-0.0.2.tar.gz

Download URL solveit_wxbot-0.0.2.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4ee4f39c29f30b0d34b54eae201cb37958e7352aec84a093cd716504e123720b
BLAKE2b-256 checksum
How to use checksums
87834c1746729095efe122d5462df4e738cc2eefed9e1365b9a0b7fe197a7040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / solveit_wxbot-0.0.2-py3-none-any.whl

Download URL solveit_wxbot-0.0.2-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13aecf08ac3f3e5790afc54273bce34f2947849a91a0667d9d439fc16fe2d870
BLAKE2b-256 checksum
How to use checksums
462536b4a3e7f576e7fd1f75f4f33e119571a8c7011c0960f71b6c640408bf52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for solveit-wxbot 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page