1 Star 0 Fork 5

魅影/chatgpt-on-wechat

forked from hisaige/chatgpt-on-wechat 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
channel.py 701 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhayujie 提交于 2022-12-10 16:46 +08:00 . feat: user session cache
"""
Message sending channel abstract class
"""
from bridge.bridge import Bridge
class Channel(object):
def startup(self):
"""
init channel
"""
raise NotImplementedError
def handle(self, msg):
"""
process received msg
:param msg: message object
"""
raise NotImplementedError
def send(self, msg, receiver):
"""
send message to user
:param msg: message content
:param receiver: receiver channel account
:return:
"""
raise NotImplementedError
def build_reply_content(self, query, context=None):
return Bridge().fetch_reply_content(query, context)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/edge006/chatgpt-on-wechat.git
git@gitee.com:edge006/chatgpt-on-wechat.git
edge006
chatgpt-on-wechat
chatgpt-on-wechat
master

搜索帮助