New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

github.com/walkerdu/wecom-backend

Package Overview
Dependencies
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/walkerdu/wecom-backend

Source
Go Modules
Version
v0.0.0-20240401154736-ac3c55a9397f
Version published
Created
Source

企业微信ChatGPT聊天应用

License: MIT

本项目是一个基于Go开发的企业微信聊天应用,目前只支持OpenAI的Chat服务,用户通过企业微信的应用发送聊天后,后端服务会通过SSE异步推流的方式和OpenAI交互,直到所有数据接收完后,将OpenAI的生成结果推送给企业微信的用户,如下:

image

Usage

  • 编译
$git clone https://github.com/walkerdu/wecom-backend.git
$cd wecom-backend
$make
  • 基于configs/config.json修改实际参数
{
    "open_ai": {
        "api_key": "sk-xxxxxxx"
    },
    "we_com": {
        "agent_config": {
            "corp_id": "ww123456",
            "agent_id": 1000004,
            "agent_secret": "Vitug6o-xxxx",
            "agent_token": "8kxL1xxxxxx",
            "agent_encoding_aes_key": "nxyGtXNFKzj7OHytzWkEV9awgxxxxxx"
        },
        "addr": ":9001"
    }
}
  • 启动服务
$bin/wecom-backend -f configs/config.json

也可以直接通过命令行传入服务参数,如下:

$bin/wecom-backend --corp_id ww2712xxx --agent_id 1000004 --agent_secret Vitug6o-xxxx --agent_token 8kxLxxxxx --agent_encoding_aes_key nxyGtXNFKzj7xxxxxxxxx --addr :9001 --openai_apikey sk-80apwArF4xxxxxxx

FAQs

Package last updated on 01 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts