OpenAI ChatGPT 的逆向工程SDK。可扩展用于聊天机器人等。觉得不错请右上角Star
感谢 revChatGPT.
可以写代码,写小说,写作文、演讲稿、工作报告、读书笔记、合同等
maven
<dependency>
<groupId>com.github.plexpt</groupId>
<artifactId>chatgpt</artifactId>
<version>1.0.1</version>
</dependency>
gradle
implementation group: 'com.github.plexpt', name: 'chatgpt', version: '1.0.1'
然后
Chatbot chatbot = new Chatbot("sessionToken");
Map<String, Object> chatResponse = chatbot.getChatResponse("hello");
System.out.println(chatResponse.get("message"));
注意:一个Chatbot实例为一个Session,会持有对话上下文,可以回复:继续 让机器人接着说。如果需要对话互相隔离,new 多个Chatbot实例即可。
https://github.com/acheong08/ChatGPT/wiki/Setup#token-authentication
- 通过 https://chat.openai.com/chat 注册并登录。
- 打开浏览器开发者工具,切换到 Application 标签页。
- 在左侧的 Storage - Cookies 中找到 __Secure-next-auth.session-token 一行并复制其值
https://juejin.cn/post/7173447848292253704
https://mirror.xyz/boxchen.eth/9O9CSqyKDj4BKUIil7NC1Sa1LJM-3hsPqaeW_QjfFBc
- 下载
- 编辑 config.json 里的sessionToken
- 运行 run.bat
- 注意:输入之后需要回车两次
If you have a cool project you want added to the list, open an issue.
这不是官方的 OpenAI 产品。这是一个个人项目,与 OpenAI 没有任何关联。
CLI 功能仅用于演示和测试。不支持验证码(对于不干净的 IP 地址)
@rawandahmad698 has a much better CLI tool at
PyChatGPT supports captcha!