alpaca4610 / nonebot_plugin_chatgpt_turbo Goto Github PK
View Code? Open in Web Editor NEW具有上下文关联和多模态识别(识图),适配OneAPI和OpenAI官方的nonebot插件。
具有上下文关联和多模态识别(识图),适配OneAPI和OpenAI官方的nonebot插件。
弹出的消息是“该消息类型暂不支持查看”,更新了qq版本还是不行,大家有遇到过吗
COMMAND_START=[ "",""] ,使用clear或/clear或//clear均无回应
请问如果我想要在群聊中让大家共享同一个Session该如何更改下面的代码呢?
# 根据消息类型创建会话id
def create_session_id(event):
if isinstance(event, PrivateMessageEvent):
session_id = f"Private_{event.user_id}"
elif public:
session_id = event.get_session_id().replace(f"{event.user_id}", "Public")
else:
session_id = event.get_session_id()
return session_id
或者说还有什么方法可以实现吗?
init.py 125行优先级应为99(如果同上的话)
首先非常感谢你做出的插件,我最近一直有在使用它
我查看了你的代码,想提几点不成熟的小建议
我注意到,为了实现私聊功能,你加入了if plugin_config.enable_private_chat:
来启用针对私聊的处理,但是绝大部分的代码都是重复的,并且在nonebot初始化插件导入时会因为相同的触发命令而报几个warning。
以下是我的几个修改意见:
第一种方法,你可以将handler
中的event:
替换为MessageEvent
,随后使用if isinstance(event, GroupMessageEvent):
和if isinstance(event, PrivateMessageEvent):
来判断当前消息是私聊还是群聊;
第二种方法,你可以为相同的功能只保留一个matcher
,但是你可以写多个@matcher.handle
匹配不同的类型。
希望这些对你有帮助,非常感谢你对nonebot社区的贡献。
报Error communicating with OpenAI是key被封了吗
目前在私聊只会响应此插件而无法触发其他插件,能不能让插件不响应我私聊的消息
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.