Coder Social home page Coder Social logo

oddfar / coze-discord Goto Github PK

View Code? Open in Web Editor NEW
179.0 3.0 38.0 110 KB

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

logo

使用两个Discord机器人代理Coze服务,免费使用GPT-4高级模型的API功能

coze-discord

介绍

项目已失效,仅供学习

简介:Coze 的机器人集成了 GPT-4 等模型,并可以发布 Discord 等平台。Discord 机器人能够发送和接收消息,我们使用了两个机器人:一个与 Coze 机器人进行绑定的应用,另一个负责向 Coze 机器人发送消息和获取消息。通过这种方式,我们可以免费使用 GPT-4,并拓展 API 等其他功能。

功能如下:

  • 支持 api 方式调用
  • 对话支持流式返回
  • 支持对话指定 Discord 频道、子频道,实现对话隔离支
  • 支持创建 Discord 频道、子频道、线程
  • 对话支持文生图

未来计划:

  • 对话支持图生文
  • 支持和 openai 的对话接口、GPT4V识图接口...
  • 支持配置多个机器人

若您有好的想法,发现一些 BUG 并修复了,欢迎提交 Pull Request 参与开源贡献

使用教程

使用教程:https://oddfar.github.io/campus-doc/pages/b31421/

部署教程:https://oddfar.github.io/campus-doc/pages/60eaa2/

平台

Coze: https://www.coze.com/

Discord Api: https://discord.com/developers/docs/intro

Discord SDK JDA: https://jda.wiki/

演示图

image-20240201225345802

image-20240201225419850

image-20240202153712692

鸣谢

感谢以下项目的开源的付出:

coze-discord's People

Contributors

oddfar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

coze-discord's Issues

Cannot invoke \"net.dv8tion.jda.api.entities.channel.concrete.TextChannel.canTalk()\" because \"textChannel\" is null

直接使用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

注:服务器部署在国外

[Feature] 等一个Python版本

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

功能请求

后期会有其他语言吗?比如python版本的

解决方案和应用场景

融入现有的大语言模型测试框架

[Feature] 对话支持文生图

功能请求

对话支持文生图

解决方案和应用场景

image

收到消息的回调中:MessageListener,可根据以下代码获取图片的url

        List<MessageEmbed> embeds = message.getEmbeds();
        for (MessageEmbed messageEmbed : embeds) {
            MessageEmbed.ImageInfo image = messageEmbed.getImage();
            log.info("嵌套消息图片Url {}", image.getUrl());
        }

当它有嵌套消息时,一般为图片作答

[bug] 代理无法使用,网上查了一下做了一下修改

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);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.