Skip to content

Commit

Permalink
正式上线0.6版本
Browse files Browse the repository at this point in the history
  • Loading branch information
fatwang2 committed Dec 10, 2023
1 parent 77743a6 commit 12f0560
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
Binary file removed picture/[email protected]
Binary file not shown.
Binary file added picture/追问.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
[telegram频道 ](https://t.me/+w2Z8S0Y8H2IxZDI9)

## 更新日志
- V0.6.0,20231210,支持文件、链接多轮对话,OpenAI支持搜索模式
- V0.5.6,20231209,支持搜索提示词的自定义配置
- V0.5.5,20231209,支持图片多轮对话,图片默认总结后,3min内输入提问提示词即可继续追问,提示词可自定义
- V0.5.5,20231209,支持图片多轮对话,图片默认总结后,5min内输入提问提示词即可继续追问,提示词可自定义
- V0.5.1,20231209,群聊开关支持图片、文件,可通过修改配置文件的group_sharing来判断是否支持自动对群聊的图片、文件做总结
- V0.5.0,20231206,新增支持讯飞图片总结功能,免费赠送200万token,感谢alexgang的PR
- V0.4.1,20231203,调整图片总结功能的最大token为3000,避免截断
Expand Down Expand Up @@ -35,7 +36,8 @@
本项目为微信插件,需配合[chatgpt-on-wechat](https://github.com/zhayujie/chatgpt-on-wechat)项目使用

## 功能特点
- 支持联网实时搜索
- 支持联网搜索
- 支持多轮追问
- 支持文章内容总结,个人微信支持链接卡片和url,企微支持url
- 支持文件内容总结,包括pdf、doc、markdown、txt、xls、csv、html、ppt
- 支持图片总结,包括png、jpeg、jpg
Expand All @@ -45,15 +47,19 @@
- 支持自定义搜索、追问提示词
<table>
<tr>
<td><img src="picture/WX20231202-182036@2x.png" width="400px" alt="文件" /></td>
<td><img src="picture/追问.png" width="400px" alt="文件" /></td>
<td><img src="picture/[email protected]" width="400px" alt="搜索" /></td>
<td><img src="picture/[email protected]" width="400px" alt="图片" /></td>
</tr>
<tr>
<td><img src="picture/[email protected]" width="400px" alt="图片" /></td>
<td><img src="picture/image-6.png" width="400px" alt="链接卡片" /></td>

</tr>
<tr>
<td><img src="picture/抖音.png" width="400px" alt="抖音" /></td>
<td><img src="picture/image.png" width="400px" alt="小红书" /></td>
</tr>

</table>

## 安装
Expand All @@ -69,7 +75,7 @@

| 服务 | 支持功能 | 特点 | 注册地址 | 图片介绍 |
|------|----------|------|----------|-----------|
| OpenAI | 文件、图片、绝大部分网页文章 | 无需额外申请服务,舍得花钱的话,效果最可控 | [OpenAI](https://platform.openai.com/account/api-keys) \| [LinkAI代理](https://sum4all.site/linkai) | ![OpenAI](picture/openai.png) |
| OpenAI | 搜索、文件、图片、绝大部分网页文章 | 无需额外申请服务,舍得花钱的话,效果最可控 | [OpenAI](https://platform.openai.com/account/api-keys) \| [LinkAI代理](https://sum4all.site/linkai) | ![OpenAI](picture/openai.png) |
| Sum4all | 搜索、文件、绝大部分网页文章 | 注册免费送1万token,邀请好友注册再各得5k,觉得好用的还可以注册Poe上的同名机器人 | [sum4all](https://sum4all.site/key) \| [Poe Sum4all机器人](https://sum4all.site/poe) | ![Sum4all](picture/sum4all.png) |
| Perplexity | 搜索 | 国外的搜索总结服务,速度快,价格贵,自带大模型,需自行注册和付费 | [Perplexity](https://sum4all.site/perplexity) | ![Perplexity](picture/p.png) | ![Alt text](picture/[email protected]) |
| 讯飞 | 图片 | 讯飞星火大模型的图片理解功能,免费200万token,随便用 | [xunfei](https://sum4all.site/xunfei) | ![Perplexity](picture/讯飞.png) |
Expand All @@ -86,8 +92,8 @@
"sum_service":"", #内容总结服务,openai、sum4all、bibigpt、opensum
"search_sum":"", #搜索开关,默认不开启,开启需改为 true,在微信端使用时,需要以“搜”字开头才会触发
"file_sum": false, #文件总结开关,默认不开启,开启需改为 true,目前支持sum_service为openai和sum4all
"image_sum": false, #图片总结开关,默认不开启,开启需改为 true,目前支持sum_service为为openai
"search_service":"", #搜索服务,目前支持sum_service为sum4all和perplexity
"image_sum": false, #图片总结开关,默认不开启,开启需改为 true,目前支持sum_service为openai和xunfei
"search_service":"", #搜索服务,目前支持sum_service为sum4all、openai和perplexity
"image_service":"", #图片总结服务,目前支持openai和xunfei
"group_sharing": true, #是否支持群聊内的链接卡片、文件和图片
"qa_prefix":"问", #追问提示词,以该词开头,才能触发追问
Expand Down
6 changes: 3 additions & 3 deletions sum4all.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
name="sum4all",
desire_priority=2,
desc="A plugin for summarizing all things",
version="0.5.11",
version="0.6.0",
author="fatwang2",
)

Expand Down Expand Up @@ -313,11 +313,11 @@ def handle_url(self, content, e_context):
additional_content = "" # 在 try 块之前初始化 additional_content

try:
logger.info('Sending request to Sum4All...')
logger.info('Sending request to LLM...')
api_url = "https://ai.sum4all.site"
response = requests.post(api_url, headers=headers, data=payload)
response.raise_for_status()
logger.info('Received response from Sum4All.')
logger.info('Received response from LLM.')
response_data = response.json() # 解析响应的 JSON 数据
if response_data.get("success"):
content = response_data["content"].replace("\\n", "\n") # 替换 \\n 为 \n
Expand Down

0 comments on commit 12f0560

Please sign in to comment.