View Code? Open in Web Editor
NEW
Using two Discord robot proxies for Coze service, free access to the API features of the GPT-4 advanced model.使用两个Discord机器人代理Coze服务,免费使用GPT-4高级模型的API功能(项目已失效,仅供学习)
License: MIT License
Java 98.67%
Dockerfile 1.33%
coze-discord's Introduction
🔭 I'm now in my fourth (4rd year) year of college.
🌱 I’m currently learning.
😄 Pronouns: 致远|oddfar
⚡ Fun fact: I found that I do not know anything. 😣
coze-discord's People
Contributors
coze-discord's Issues
直接使用docker 部署后,具体参数也换成自己的,会报这个错,
docker run --net host -d --restart=always
--name coze-discord
--privileged
-e TZ=Asia/Shanghai
-e SERVER_PORT=8080
-e DISCORD_BOT_TOKEN="xxxxxxxxx"
-e DISCORD_GUILD_ID="1xxxxxxxxxx3"
-e DISCORD_COZE_BOT_ID="1xxxxxxxxx2"
-e DISCORD_CHANNEL_ID="1xxxxxxxxxxxx0"
ghcr.io/oddfar/coze-discord:master
注:服务器部署在国外
功能请求
对话支持文生图
解决方案和应用场景
收到消息的回调中:MessageListener
,可根据以下代码获取图片的url
List <MessageEmbed > embeds = message .getEmbeds ();
for (MessageEmbed messageEmbed : embeds ) {
MessageEmbed .ImageInfo image = messageEmbed .getImage ();
log .info ("嵌套消息图片Url {}" , image .getUrl ());
}
当它有嵌套消息时,一般为图片作答
Proxy proxy = new Proxy (Proxy .Type .SOCKS ,
InetSocketAddress .createUnresolved (hostPort [0 ], Integer .parseInt (hostPort [1 ])));
OkHttpClient .Builder okHttpBuilder = new OkHttpClient .Builder ().proxy (proxy );
WebSocketFactory factory = new WebSocketFactory ();
// 本地http代理是socks+1
factory .getProxySettings ().setHost (hostPort [0 ]).setPort (Integer .parseInt (hostPort [1 ])+1 );
builder .setHttpClientBuilder (okHttpBuilder ).setWebsocketFactory (factory );
例行检查
功能请求
后期会有其他语言吗?比如python版本的
解决方案和应用场景
融入现有的大语言模型测试框架
暂时不清楚是发送的太频繁,还是不支持机器人互动,已经不会回复了,但是真人询问又可以